[LLVMbugs] [Bug 17392] New: Cannot declare anonymous union in instance variable block

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 27 17:54:01 PDT 2013


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

            Bug ID: 17392
           Summary: Cannot declare anonymous union in instance variable
                    block
           Product: clang
           Version: 3.1
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kyle at omnigroup.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

@interface Foo
{
    union {
        int a;
        int b;
    };
}
@end
/// end

$ clang -v
Apple clang version 4.0 (tags/Apple/clang-421.10.60) (based on LLVM 3.1svn)

$ clang -fsyntax-only t.m
t.m:3:5: warning: declaration does not declare anything
[-Wmissing-declarations]
    union {
    ^~~~~
1 warning generated.

GCC supports anonymous unions without the need of an attribute, so I would
expect this to work here.

-- 
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/20130928/cb1548bc/attachment.html>


More information about the llvm-bugs mailing list