This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Packed structures
- From: John Love-Jensen <eljay at adobe dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 02 Jul 2003 09:05:30 -0500
- Subject: Re: Packed structures
Hi Gusti,
The "__attribute__((packed))" is not portable between different compilers.
And may lead to code that creates bus errors on certain platforms.
Treating everything as bytes, and having glue routines that pack/unpack them
appropriately, defends against bus errors, doesn't rely on compiler
extensions, and is more portable.
--Eljay