Mail Archives: djgpp/2000/04/01/01:41:17
batchex <thedark1NOthSPAM AT phreaker DOT net DOT invalid> wrote:
>Hi,
>
>I notice DJGPP/GCC generates by default, 4 bytes aligned
>structures. Currently, I need at least 2 of my structures are
>packed (no holes). I read the manual about a compiler option to
>do this, but it will generate ALL structures as packed. I only
>need 2 (or several more) structures packed, and others are
>aligned. How can I do this? Are there any preprocessors that can
>be used to tell the compiler if I want a specific structure to
>be packed and else to be aligned?
>
>BTW, anybody knows where I can find a documentation of all C/C++
>preprocessors?
Use "__attribute__((packed))" see section 22.10 of the FAQ.
See cpp.info for the preprocessor docs.
--
Manni
- Raw text -