http://llvm.org/bugs/show_bug.cgi?id=3562
Summary: clarify error on gcc vla-in-struct extension
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]
clang should give a clearer error on code that uses gcc's "vla-in-struct"
extension (is there a name for it?):
--
ddun...@milton:gcc$ cat t.c
void f0(int n,...) {
struct S {
double a[n];
} s;
double x = s.a[0];
}
ddun...@milton:gcc$ clang t.c
t.c:3:21: error: fields must have a constant size
double a[n];
^
t.c:5:14: error: subscripted value is neither array nor pointer
double x = s.a[0];
^ ~
2 diagnostics generated.
--
Something like "This gcc extension is not supported, and will hopefully never
be. Change your code you loon." It'd be nice not to get the second error as
well.
--
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