[LLVMbugs] [Bug 3797] initializer element is not a compile-time constant ( address of variable)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Mar 13 09:32:34 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=3797


Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dgregor at apple.com
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Douglas Gregor <dgregor at apple.com>  2009-03-13 11:32:33 ---
Clang is doing the right thing, because this code is ill-formed. GCC 4.2 also
rejects it:

gcc -fsyntax-only foo.c
foo.c:7: warning: cast from pointer to integer of different size
foo.c:7: error: initializer element is not constant
foo.c:7: error: (near initialization for ‘table[0].first_def’)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list