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

           Summary: compound literals rejected in strange way
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


This compiles fine:
struct a { int x, y };
struct a V = (struct a){ 1, 2};

This does is rejected by sema:
struct a { int x, y };
const struct a V = (struct a){ 1, 2};

t.c:4:20: error: initializer element is not a compile-time constant
const struct a V = (struct a){ 1, 2};
                   ^~~~~~~~~~~~~~~~~


Huh?


-- 
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

Reply via email to