This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: GCC
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Bruno Aulagner'" <bruno dot aulagner at libertysurf dot fr>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 11 Oct 2002 13:13:35 +0100
- Subject: 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.