Size-of struct with uneven 8bit members is not uneven [duplicate]

This question already has an answer here:

  • How to tell gcc to disable padding inside struct? [duplicate] 3 answers

If you use the packed attribute, your structs will not contain padding.

struct __attribute__((packed)) uuu { // will now contain 5 bytes

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image