https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82105

--- Comment #7 from Dudu <dudu.arbel at ilrd dot co.il> ---
By the way: if you use long instead of int - you get no padding between x and
y, so the size of the struct is smaller!!!

typedef struct {
        unsigned long x:16;
        unsigned long y:17;
        unsigned short z;
} SizeofThisIs8;

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

Is this really the expected behavior???

Reply via email to