File: have-bitfields-in-packed-structs.c

package info (click to toggle)
picolibc 1.8.10-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 35,180 kB
  • sloc: ansic: 281,743; asm: 24,646; python: 2,282; sh: 2,237; perl: 680; pascal: 329; exp: 287; makefile: 209; cpp: 72; xml: 40
file content (3 lines) | stat: -rw-r--r-- 177 bytes parent folder | download | duplicates (2)
1
2
3
struct test { int part: 24; } __attribute__((packed));
static unsigned int foo (const struct test *p) { return p->part; }
int main() { struct test x = { 12 }; return foo(&x); }