[LLVMbugs] [Bug 6362] New: A potential bug in pragma pack
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Feb 21 03:01:56 PST 2010
http://www.llvm.org/bugs/show_bug.cgi?id=6362
Summary: A potential bug in pragma pack
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P5
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: amine48rz at gmail.com
Estimated Hours: 0.0
Here's the testcase :
#pragma pack(2)
typedef struct { unsigned int a; } b;
static void A(void) {
extern void __C_ASSERT__(int [(__alignof__(((b*)0)->a) == 2)?1:-1]);
}
Clang emits an error : array size is negative
extern void __C_ASSERT__(int [(__alignof__(((b*)0)->a) == 2)?1:-1]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Configure bugmail: http://www.llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the llvm-bugs
mailing list