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]
Other format: [Raw text]

Re: struct __attribute((packed));


Paul Koning wrote:

E> According to the docs here:
E> <http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Type-Attributes.html#Type-Attributes>

E> what about doing something like this?:

E> typedef int packed_int
E> __attribute__ ((aligned (1)));

E> packed_int *ppi;

That would make sense, but it has never worked for me. It seems that
attributes don't apply to type names, only to variables and members.




What?! That whole section in the docs talks about attributes on types. If it doesn't work as described, then the docs need some serious rework.

Eric


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