Gavin Li wrote:
I have some structures defined as:
typedef struct {
unsigned char ID __attribute__ ((packed)) ;
CALIB_ASC asc __attribute__ ((packed)) ;
} ASC __attribute__ ((packed)) ;
when I compiled the c source file, gcc send warning packed is ignored.
There is no warning when use gcc -2.95.x
I believe moving the __attribute__ ((packed)) BEFORE the struct name
instead of after will sort it out.
Another problem the option -fvolatile is not supported in gcc-3.4.2,
what is
the equivalent to do that?
I couldn't find out what this used to do. Maybe whatever it was, it
isnow done automatically.
-Andy