Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Invalid sizeof of long double

yjh_styx
Beginner
291 Views
Bug in ICL (for windows?) 32 bit (check in 9.1 and 10.1)

#pragma pack(1)
typedef struct {
char a;
long double ld;
char b;
}test_t;
#pragma pack()

test_t test = { 'a', 0, 'b' };

When compile with /Qlong-double

place for test.ld is 16byte, and MUST be 10byte


0 Kudos
1 Reply
levicki
Valued Contributor I
291 Views

I can confirm this to be true for 32-bit and 64-bit ICC 10.1.011 for Windows. You should submit an issue on the premier support website.

0 Kudos
Reply