http://llvm.org/bugs/show_bug.cgi?id=8551
Summary: Wrong type for address-of anonymous union member.
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
clang++ generates an error diagnostic when parsing the following program (from
g++ testsuite):
struct myclass {
unsigned a;
union {
unsigned x;
};
};
int main () {
myclass foo;
unsigned myclass::* member = &myclass::x;
if (&(foo.*member) != &foo.x)
return 1;
}
$ clang++ -cc1 bug.C
bug.C:13:23: error: cannot initialize a variable of type 'unsigned int
myclass::*' with an rvalue of type 'unsigned int myclass::<anonymous union at
bug.C:6:3>::*'
unsigned myclass::* member = &myclass::x;
^ ~~~~~~~~~~~
1 error generated.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs