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: modify gcc to handle byteorder issue automatically


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







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