Mail Archives: djgpp/1993/08/28/08:13:56
Thanks to all that responded to my question on a work-around for
the 4-byte alignment. removing the semicolon in
#define PACKED __attribute__ ((packed));
didn't make any difference, gcc still crashed. However, removing
the debug "-g" option from the compiler line did. I now get a
runtime "6" output from the following excerpt. Thanks again to
one and all.
struct s_attach
{ short s;
long i PACKED;
};
void main(void)
{ printf("%d\n",sizeof(struct s_attach));
}
Terry Abbott
terry AT aegis DOT larc DOT nasa DOT gov
- Raw text -