attribute ((packed)) on variables
Etienne Lorrain
etienne.lorrain@ibm.net
Thu Aug 19 03:13:00 GMT 1999
Hi,
I have reported, quite a long time ago, a problem when you
try to get a short alignement (or no alignment) on variables:
http://www.progressive-comp.com/Lists/?l=egcs-bugs&m=91303898717233&w=3
When you read documentation, it is done by:
struct my_struct_type my_struct attribute ((packed));
It could be done by
struct my_struct_type my_struct attribute ((aligned(1)));
but usually "attribute ((aligned(x)))" is to specify
the minimum alignment needed.
None of these two method works (the test case is in the http
address), and I really do not want my structure aligned,
mostly 32 bytes aligned.
I stoped complaining when someone told me in private that
the problem was corrected in GCC-2.95, but now I am using
this compiler and it is still not working...
Someone has a solution? (other than using "sed" on the
assembler file).
Thanks,
Etienne.
More information about the Gcc
mailing list