modify gcc to handle byteorder issue automatically

hartmut.schirmer@arcormail.de hartmut.schirmer@arcormail.de
Fri Aug 8 11:16:00 GMT 2003


Jim Wilson <wilson at tuliptree dot org>:
> It seems easier to let users handle this in their own applications rather
> than handling it in the compiler.

Why not extend the __mode__ attribute

__attribute__((__mode__(__SI__))) -> default endianess
__attribute__((__mode__(__SI__,__BE__))) -> big endian
__attribute__((__mode__(__SI__,__LE__))) -> little endian

This way one doesn't have to worry about structs and bitfields
and solves the problem for most of the users.

Hartmut








More information about the Gcc mailing list