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

           Summary: misdiagnosis of scalar initializer for flexible array
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


--
ddun...@milton:min$ cat /tmp/t.c
struct { int x; int y[]; } a = { 1, 2 };
ddun...@milton:min$ ccc -fsyntax-only /tmp/t.c
/tmp/t.c:1:37: warning: excess elements in struct initializer
struct { int x; int y[]; } a = { 1, 2 };
                                    ^
1 diagnostic generated.
--

gcc treats "2" as a single initializer for the flexible array, I don't think we
need that level of compatibility but we should at least error on this (vs
miscompiling).


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