This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 compile/22084] New: unexpected padding in a struct


https://sourceware.org/bugzilla/show_bug.cgi?id=22084

            Bug ID: 22084
           Summary: unexpected padding in a struct
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: compile
          Assignee: unassigned at sourceware dot org
          Reporter: dudu.arbel at ilrd dot co.il
  Target Milestone: ---

There is an unexpected padding (of 2 bytes) between x and y in the following
struct.
This causes it to be of size 12 bytes, although 8 bytes should be enough.
This behavior seems inconsistent to many other examples (e.g - reducing x size
to 15, eliminates the padding)

typedef struct {
        unsigned int x:16;
        unsigned int y:17;
        unsigned short z;
} XXX;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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