This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49459] New: attribute((mode(byte))) in a typedef produces wrong debug information


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: unassigned@gcc.gnu.org
        ReportedBy: pkoning@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]