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: Big-endian Gcc on Intel IA32


<<<<One thing that might be helpful for portability issues like this, where
the user _is_ willing and able to recompile the application, but maybe
not able to find all subtly users of byte-order dependencies would be to
allow the notion of "byte order attributes" on data structures.
>>


This is a much trickier language feature to design than you would imagine.
We have been struggling with this in Ada for a while.

<<Imagine being able to just tag the data structures with "this data
structure is big-endian", and have the compiler automatically do the
conversion when a value is loaded from such a data structure.
>>

I't snice to imagine, but hard to work out the details.
I am definitely not opposed to this, and indeed support an effort
to try to design such a feature. A good starting point for reading
is Norm Cohen's tutorial on the Bit_Order attribute in Ada (not sure
what the reference is, perhaps someone else can supply it).


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