This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: char type
- From: Wei Qin <wqin at EE dot Princeton dot EDU>
- To: Rupert Wood <me at rupey dot net>
- Cc: "'Moshe Yosevshvili'" <moshe dot yosevshvili at SeabridgeNetworks dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Wed, 10 Apr 2002 10:16:33 -0400 (EDT)
- Subject: 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.
>
>