data alignment

Silvio Bandeira silvio@dei.unicap.br
Tue Sep 12 13:33:00 GMT 2000


Hi guys,

    Do you know how to control arrays and structures alignment using gcc
? I need them "packed".
    I've used "__attribute__ ((packed))" after defining a struct, but it
decreases portability. Is there a more "clean" way to specify that for
all data structures?
    I've also tried "#pragma pack(1)" but gcc says "ignoring pragma".
    Thanks in advance for any information.

--
Silvio Bandeira
UNICAP - Dept. of Computer Science





More information about the Gcc mailing list