This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wide characters and GCC
Joseph S. Myers writes:
> The C and C++ front ends (at least) presume that a STRING_CST contains a
> series of host bytes, each of which corresponds to exactly one target
> byte. This is inappropriate; you can specify \x12345678 in a string
> constant and this should represent a target byte with that value, if
> target bytes are wide enough.
While chars are stored as 32-bits on the C4x there is an underlying
assumption that only the 8 LSBs are significant. Since sizeof(char)
= sizeof(short) = sizeof(int) on the C4x, you generally would use an
int type to store larger constants.
Michael.