This is the mail archive of the gcc-help@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: char type



I am curious on this. Why would some compiler treat char as signed
and some others as unsigned? Is this due to the fact that some
architectures miss signed byte load (So if char is signed, an unsigned
byte load + sign-extension operation(s) will be needed) ?

thanks,

Wei

On Wed, 10 Apr 2002, Rupert Wood wrote:

> Moshe Yosevshvili wrote:
>
> (this list is now gcc-help@gcc.gnu.org)
>
> > Using GCU CC compiler under VxWorks.
> > I wonder how char variable is considered:
> > Signed char or
> > Unsigned char.
> >
> > I use a PPC CPU (MPC 7400 by Motorola).
>
> The current sources consider it unsigned, as with most PPC targets. (You
> may see for yourself by looking for DEFAULT_SIGNED_CHAR in the
> gcc/config/rs6000 directory.)
>
> However, this may have changed over time, and VxWorks might have
> supplied a different version of GCC anyway - you might have to ask
> windriver to be sure.
>
> Rup.
>
>


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