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: [email protected]
ReportedBy: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs