[LLVMbugs] [Bug 80] New: llvm-gcc coughs up unsavory substances when taking ptr to empty struct
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Sat Nov 1 11:37:38 PST 2003
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=80
Summary: llvm-gcc coughs up unsavory substances when taking ptr
to empty struct
Product: tools
Version: 1.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P2
Component: llvm-gcc
AssignedTo: sabre at nondot.org
ReportedBy: gaeke+bugs at uiuc.edu
108 gally> llvm-gcc -c cracktacular.c
cracktacular.c: In function `foo':
cracktacular.c:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.cs.uiuc.edu> for instructions.
109 gally> cat cracktacular.c
typedef struct { } the_coolest_struct_in_the_world;
extern the_coolest_struct_in_the_world xyzzy;
void *foo() { return &xyzzy; }
The unfortunate thing is that regular old gcc accepts this code, and I think it
should be giving us a parse error. In ISO9899 6.2.5 (20), it says that
"A structure type describes a sequentially allocated *nonempty* set of member
objects..." (emphasis mine).
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list