Mail Archives: djgpp/1996/06/14/15:50:52
Reply to message 5671512 from MWOOD AT INDYVAX on 06/13/96 1:05PM
>Or litter your code with __attribute__ ((packed)) like I've been doing lately.
>I don't suppose there's an -fall_structs_packed that I missed?
You could always try -fpack-structs. :) It's generally not a good idea to
use this, though, because it causes the compiler to assume that all
library structures are packed as well, which is not true because they
weren't compiled that way. If your program doesn't use any library
structures (difficult for all but the simplest programs), then you are safe
in using this flag, but otherwise don't try it.
Besides, you don't need every structure to be packed, do you? To
save yourself major headaches, just pack those structs that you are
using to interface with the system or that you are saving to a file with
fwrite().
John
- Raw text -