1 #define __packed __attribute__((packed)) 2 3 typedef struct { 4 __INT8_TYPE__ a; 5 __INT16_TYPE__ b; 6 __INT32_TYPE__ c; 7 } __packed obj_t; 8 9 _Static_assert(sizeof(obj_t) == 7, "sizeof packed struct"); 10 foo(obj_t * ptr,int val)11static void foo(obj_t *ptr, int val) 12 { 13 ptr->c = val; 14 } 15 bar(obj_t o)16static void bar(obj_t o) 17 { 18 foo(&o, 0); 19 } 20 21 /* 22 * check-name: packed-deref0 23 */ 24