[LLVMbugs] [Bug 11486] union { struct { }; } foo = { .bar = 0 };

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 5 23:25:11 PST 2011


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

Anton Korobeynikov <asl at math.spbu.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |asl at math.spbu.ru
         Resolution|                            |WORKSFORME

--- Comment #1 from Anton Korobeynikov <asl at math.spbu.ru> 2011-12-06 01:25:11 CST ---
Works for me on ToT / 3.0:


$ clang -c 2.c 
2.c:1:32: error: field designator 'bar' does not refer to any field in type
'union <anonymous at 2.c:1:1>'
union { struct { }; } foo = { .bar = 0 };
                               ^
2.c:2:36: error: field designator 'bar' does not refer to any field in type
'union <anonymous at 2.c:2:10>'
int x = (union { struct { }; }) { .bar = 0 };
                                   ^
2 errors 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.



More information about the llvm-bugs mailing list