This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: modify gcc to handle byteorder issue automatically
- From: hartmut dot schirmer at arcormail dot de
- To: wilson at tuliptree dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 8 Aug 2003 08:30:31 +0200 (CEST)
- Subject: 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