[LLVMbugs] [Bug 5538] Lack of diagnostic when a static variable inside a class has the same name of the class type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 23 17:21:21 PST 2012


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

Kaelyn Uhrain <rikka at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rikka at google.com
         Resolution|                            |FIXED

--- Comment #1 from Kaelyn Uhrain <rikka at google.com> 2012-01-23 19:21:21 CST ---
Not sure when the fix went in, but as of the clang 3.0 release the sample code
does trigger an error:

$ clang++ example.cc
example.cc:3:18: error: member 'A' has the same name as its class
      static int A;
                 ^
1 error generated.

$ clang++ --version
clang version 3.0 (tags/RELEASE_30/final)
Target: x86_64-pc-linux-gnu
Thread model: posix

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