public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/8859] [CygWin] Initializer element allegedly not constant
[not found] <20021207074600.8859.mlt@bredband.net>
@ 2003-07-17 10:55 ` dannysmith at gcc dot gnu dot org
2003-07-17 11:22 ` giovannibajo at libero dot it
1 sibling, 0 replies; 2+ messages in thread
From: dannysmith at gcc dot gnu dot org @ 2003-07-17 10:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8859
------- Additional Comments From dannysmith at gcc dot gnu dot org 2003-07-17 10:55 -------
This should be closed, IMO. The initializer element is not constant, as
explained in my last post, so the error report is valid.
Here is minimal testcase:
__declspec (dllimport) int foo;
int* hook = &foo;
This is what MS compiler say about it:
cl /c address.c
d:\develop\bugs\address.c(2) : error C2099: initializer is not a constant
This is what gcc (3.4) says:
gcc -c address.c
address.c:2: error: initializer element is not constant
A workaround is available for dllimported function addresses (not data) and
that is to use -mnop-fun-dllimport switch to ignore the attribute for functions
Danny
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/8859] [CygWin] Initializer element allegedly not constant
[not found] <20021207074600.8859.mlt@bredband.net>
2003-07-17 10:55 ` [Bug c/8859] [CygWin] Initializer element allegedly not constant dannysmith at gcc dot gnu dot org
@ 2003-07-17 11:22 ` giovannibajo at libero dot it
1 sibling, 0 replies; 2+ messages in thread
From: giovannibajo at libero dot it @ 2003-07-17 11:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8859
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From giovannibajo at libero dot it 2003-07-17 11:22 -------
Not a bug, as explained by Danny. And it does emit a correct error message in
all open branches. Thanks Danny for your patches!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-17 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20021207074600.8859.mlt@bredband.net>
2003-07-17 10:55 ` [Bug c/8859] [CygWin] Initializer element allegedly not constant dannysmith at gcc dot gnu dot org
2003-07-17 11:22 ` giovannibajo at libero dot it
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 read-only IMAP folder(s) and NNTP newsgroup(s).