[LLVMbugs] [Bug 19971] New: elaborated-type-specifier in local class does not match declaration in nearest block scope

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 6 10:43:44 PDT 2014


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

            Bug ID: 19971
           Summary: elaborated-type-specifier in local class does not
                    match declaration in nearest block scope
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hstong at ca.ibm.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

### SOURCE:> cat localClassElaboratedTypeSpec.cc
void foo() {
   struct A {
      struct B *pb;
   } a;
   struct B { } b;
   a.pb = &b;
}
Return:  0x00:0


### COMPILER INVOCATION AND OUTPUT:> clang++ localClassElaboratedTypeSpec.cc -c
-Wall -Wextra -pedantic-errors
localClassElaboratedTypeSpec.cc:6:9: error: assigning to 'struct B *' from
incompatible type 'struct B *'
   a.pb = &b;
        ^ ~~
1 error generated.
Return:  0x01:1


### EXPECTED OUTPUT:> g++ localClassElaboratedTypeSpec.cc -c -Wall -Wextra
-pedantic-errors
Return:  0x00:0


### VERSION INFO:> clang++ -v
clang version 3.5.0
Target: powerpc64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/ppc64-redhat-linux/4.4.4
Found candidate GCC installation: /usr/lib/gcc/ppc64-redhat-linux/4.4.6
Selected GCC installation: /usr/lib/gcc/ppc64-redhat-linux/4.4.6
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Return:  0x00:0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140606/203cd3a0/attachment.html>


More information about the llvm-bugs mailing list