On Fri, Feb 21, 2014 at 1:40 PM, Kenneth Graunke <kenn...@whitecape.org> wrote: > Please just do: > > unsigned eot:1;
For #include <stdint.h> struct a { unsigned a:1; unsigned b:1; unsigned c:1; }; struct b { uint8_t a:1; uint8_t b:1; uint8_t c:1; }; void f(struct a a, struct b b) {} pahole says: struct a { unsigned int a:1; /* 0:31 4 */ unsigned int b:1; /* 0:30 4 */ unsigned int c:1; /* 0:29 4 */ /* size: 4, cachelines: 1, members: 3 */ /* bit_padding: 29 bits */ /* last cacheline: 4 bytes */ }; struct b { uint8_t a:1; /* 0: 7 1 */ uint8_t b:1; /* 0: 6 1 */ uint8_t c:1; /* 0: 5 1 */ /* size: 1, cachelines: 1, members: 3 */ /* bit_padding: 5 bits */ /* last cacheline: 1 bytes */ }; I initially used unsigned, but I noticed this. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev