[LLVMbugs] [Bug 3618] New: misdiagnosis of scalar initializer for flexible array
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Feb 19 01:12:09 PST 2009
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: unassignedclangbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
--
ddunbar at milton:min$ cat /tmp/t.c
struct { int x; int y[]; } a = { 1, 2 };
ddunbar at 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.
More information about the llvm-bugs
mailing list