This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

attribute ((packed)) on variables


  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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]