[LLVMbugs] [Bug 6495] extern const file-level variable with initializer raises warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 22 07:06:41 PDT 2010


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

Daniel Lowe <dlowe at bitmuse.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #4 from Daniel Lowe <dlowe at bitmuse.com> 2010-04-22 09:06:40 CDT ---
Almost fixed.  The test case I gave was fixed, but this doesn't work:

$ echo 'extern const int my_ints[] = {42,43,44};' >example_a.cc
$ echo 'int main(int argc, char *argv[]) {extern int my_ints[]; return
my_ints[0];}' >example_b.cc
$ clang++ example_a.cc example_b.cc
example_a.cc:1:18: warning: 'extern' variable has an initializer
extern const int my_ints[] = {42,43,44};
                 ^
1 diagnostic generated.

Thanks for the great response time, though!

-- 
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