Re: Packed structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux