[LLVMbugs] [Bug 2930] New: clang does not allow VLA in unions/structs as gcc does ( violates C99)
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Oct 22 03:30:18 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2930
Summary: clang does not allow VLA in unions/structs as gcc does
(violates C99)
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: missing-feature
Severity: normal
Priority: P2
Component: parser
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rdivacky at freebsd.org
CC: llvmbugs at cs.uiuc.edu
gcc accepts this code:
int
__xuname(int namesize, void *namebuf)
{
struct xutsname {
char sysname[namesize]; /* Name of this OS. */
} *name;
}
which clang refuses with:
const.c:5:25: error: arrays with static storage duration must have constant
integer length
char sysname[namesize]; /* Name of this OS. */
^~~~~~~
this violates C99 but it is needed to get full gcc compatibility
--
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