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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to