This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: GCC


Bruno Aulagner wrote:

> I'm new to Linux and GCC, and I need to compile a code with a 1 byte
> structure alignment... I found no options allowing this... 
> How can I do it ?

You can add __attribute__((packed)) to a structure definition

    http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Variable-Attributes.html

I don't think there's a switch to do this globally (or at least I don't
see one).

Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]