http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49459
Summary: attribute((mode(byte))) in a typedef produces wrong debug information Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: pkon...@gcc.gnu.org Created attachment 24554 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24554 Test case The attached test case shows attribute((mode(byte))) used to produce enums that are one byte long rather than the usual 4. The compiler actually sees the correct value of sizeof() but GDB (7.2) does not. This can be seen by compiling the test case; gdb shows the value of s1 as 1, but sizeof(foo) as 4. When compiled with GCC 3.3.3, s1 and sizeof(foo) both show up as 1, as expected.