public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dannysmith at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/8859] [CygWin] Initializer element allegedly not constant Date: Thu, 17 Jul 2003 10:55:00 -0000 [thread overview] Message-ID: <20030717105536.21148.qmail@sources.redhat.com> (raw) In-Reply-To: <20021207074600.8859.mlt@bredband.net> 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
next parent reply other threads:[~2003-07-17 10:55 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20021207074600.8859.mlt@bredband.net> 2003-07-17 10:55 ` dannysmith at gcc dot gnu dot org [this message] 2003-07-17 11:22 ` giovannibajo at libero dot it
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=20030717105536.21148.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).