Mail Archives: djgpp/1997/04/11/10:00:32
Anthony Appleyard writes:
> "Oleg Yu. Polyanski" <luke AT eed DOT miee DOT ru> replied:-
> > .... or add -fpack-struct option to gcc.
>
> And the user has to remember to type `-fpack-struct' every time he compiles.
> It got wearisome enough for me having to remember which programs call maths so
> I must type `-lm' when compiling them.
Well, I see no reasons to use packed structures *at all*. This
way is unportable between different platforms and often even between
different compilers on the same platform. By example, if you need to
read data produced (by example) by program compiled with Watcom C
compiler. In Watcom alignement is different depending on optimization
options given to compiler. So, probably, you'll have big problem to
read/write such data. Only in some cases `-fpack-struct' can really
help and programmer should use them very carefully isolating other code.
--
Sincerely yours, necrofriend.
- Raw text -