Re: how to pack data using gcc compiler?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Sung <mys@xxxxxxxxx> writes:

There is no reason to send one e-mail to both gcc-help@xxxxxxxxxxx and
gcc@xxxxxxxxxxxx  This message is more appropriate for gcc-help.
Thanks.

> a) What is the default for gcc regarding "pack" or "unpack" data structures?

If I understand your question correctly, the answer is that gcc
normally does not pack data structures.  It normally aligns members of
data structures on their natural alignment, which leads to more
efficient code.

> b) Is there a compiler flag for gcc compiler that will pack all data
> structures?

Yes, -fpack-struct.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux