From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] C compiler question: initializer is not a constant
Date: Mon, 1 Oct 2001 18:20:46 +0200 [thread overview]
Message-ID: <200110011620.SAA16953@copernicus.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Mon, 01 Oct 2001 15:35:36 +0000." <3BB8855D.406FDDA9@null.net>
> Douglas A. Gwyn responded:
> Axel Belinfante wrote:
> > "Initializers must evaluate either to a constant or to the
> > address of a previously declared external or static object
> > plus or minus a constant."
> > Is this the rule that applies?
>
> Yes. (The actual rule is slightly more complicated, but the
> actual problem you're having is explained by this version.)
[...]
I already suspected the reason to be something like this;
Thanks for clarifying.
> A workaround would be to add a "static initializer" function
> (aka "thunk") which the main program can call upon entry, to
> compute such initializer values *at run time*.
This was the solution we tried (and found succesful).
Axel.
next prev parent reply other threads:[~2001-10-01 16:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-01 13:31 Axel Belinfante
2001-10-01 15:35 ` Douglas A. Gwyn
2001-10-01 16:20 ` Axel Belinfante [this message]
2001-10-02 8:25 ` Boyd Roberts
2001-10-01 13:35 David Gordon Hogan
2001-10-01 13:47 ` Axel Belinfante
2001-10-01 13:40 rob pike
2001-10-01 13:55 ` Axel Belinfante
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200110011620.SAA16953@copernicus.cs.utwente.nl \
--to=axel.belinfante@cs.utwente.nl \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).