This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wide characters and GCC
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Wide characters and GCC
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Mon, 11 Jun 2001 01:19:18 +0100 (BST)
- cc: <gcc at gcc dot gnu dot org>
On Mon, 11 Jun 2001, Michael Hayes wrote:
> 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.
ISO C says that all bits of unsigned char are significant. While C99
allows signed char to have padding bits, ISO C++ doesn't. (Also, I doubt
GCC really supports integer types with padding bits, even though
c-tree.texi documents what TYPE_SIZE and TYPE_PRECISION are for them.)
--
Joseph S. Myers
jsm28@cam.ac.uk