This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
attribute ((packed)) on variables
- To: gcc@gcc.gnu.org, gnu-gcc-bug@gnu.org
- Subject: attribute ((packed)) on variables
- From: Etienne Lorrain <etienne.lorrain@ibm.net>
- Date: Thu, 19 Aug 1999 11:13:12 +0100
- Organization: Protection of the "jnp" instruction league
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.