Mail Archives: djgpp/1996/05/13/01:57:59
On Sun, 12 May 1996 j DOT aldrich6 AT genie DOT com wrote:
> Actually, I was wondering about that... is there a specific define I can
> check to find out if a given compiler pads structs, or would I have to
> test for each individual compiler?
You should assume that every compiler pads structs. Most of them do.
> Also, according to the docs,
> __attribute__ only works with later versions of gcc; is there any way
> besides #pragma pack() to pack structs on other compilers?
The way you tell the compiler to pack structs is inherently
compiler-dependent. AFAIK, there is no standard on how this is done, so
you must address every supported compiler in the way it understands.
- Raw text -