I'm trying to define a struct and typedef it with a single statement. I'm following the example described herehttps://gcc.gnu.org/onlinedocs/gcc-3...ttributes.html but I seems to be having a problem with even the code listed on this page.
The integer typedef works correctly but with the struct typedef I get.Code:#include <stdint.h> typedef int more_aligned_int __attribute__ ((aligned(8))); typedef struct TestCase { uint8_t data; char nothings; uint64_t not_nothing; } wait_status_ptr_t __attribute__((__packed__)); int main(int argc, char **argv) { //wait_status_ptr_t wait; return 0; }
Code:main.c:9:1: warning: ‘__packed__’ attribute ignored [-Wattributes] } wait_status_ptr_t __attribute__((__packed__)); ^