[LLVMbugs] [Bug 9471] New: Doesn't allow incomplete type in member access
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Mar 12 09:21:48 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9471
Summary: Doesn't allow incomplete type in member access
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: schaub.johannes at googlemail.com
CC: llvmbugs at cs.uiuc.edu
Clang does not conform to the C Standard, it appears (GCC doesn't either):
struct A {
int a;
int x : (sizeof ((struct A*)0)->a * 8);
};
C doesn't forbid the left operand to be a pointer to incomplete type. The only
requirement it has is that it's a pointer to a structure type, and that the
right operand shall name a member of that structure. Both conditions are
satisfied (C99: 6.5.2.3p2 and 6.2.1p7).
--
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