[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Big-endian



Steve Langasek wrote:

> On Sun, 12 Nov 2000, Adam C Powell IV wrote:
>
> > > Which of Debian's architectures are big-endian, and are there any
> > > machines online that I, as a Debian developer, can log in and test the
> > > software I maintain to see if it works properly on big-endian?
>
> > There's also 64-bit cleanliness (alpha, ultrasparc are 64-bit), and
> > signed/unsigned char (arm and PPC assume unsigned char) to worry about.
>
> It's my understanding that whether 'char' maps to an unsigned or a signed char
> is a function of the compiler, not of the architecture.  Does gcc really use
> different default values on arm and PPC than on other architectures? If so,
> why?

Can't give you a definitive answer, but at least on ARM I've heard rumors about
unsigned char handling being more efficient than signed.  So yes, gcc gives
different default values on the different architectures.

You can solve some problems using -fsigned-char, but that can create other
headaches.  Like when the maintainer of gnucash stuck that in CFLAGS, but then a
comparison failed between a constant compiled in the gnucash package which
evaluated to -1, and a constant built into glibc as 255, so currency fractions
were dropped (e.g. cents, pence).  See bug #69866.

-Adam P.

              Welcome to the best software in the world today cafe!



Reply to: