This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LittleEndian
On Tuesday 30 April 2002 22:30, you wrote:
> Allan Sandfeld Jensen wrote:
> > Sometimes it just practical if you want to retain your bitfidling
> > algorithms from one architecture to another. Ofcouse personally I would
> > prefer to have it as a syntax option to int. E.g. "little_endian long
> > int" or just "le long". The ELF-flag would then just specify which is
> > default.
>
> Why do you want syntax to determine endianness ? Surely it's detectable
> at run time.
>
Because it is less code and more elegant. You write one function with one
endianness. System that has a different can then simultate it, or simply use
the right one if they support both, like most does by now.