This is the mail archive of the
mailing list for the GCC project.
Re: Changing WCHAR_TYPE from "long int" to "int"?
- To: Eric Christopher <echristo at redhat dot com>
- Subject: Re: Changing WCHAR_TYPE from "long int" to "int"?
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Mon, 6 Aug 2001 08:22:19 -0700
- Cc: gcc at gcc dot gnu dot org, linux-mips at oss dot sgi dot com,GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- References: <20010805094806.A3146@lucon.org> <email@example.com>
On Mon, Aug 06, 2001 at 03:12:56PM +0100, Eric Christopher wrote:
> > I am working on will be the first gcc 3.x for Linux/mips. So there
> > shouldn't be any problems. Am I right?
> I _think_ you are ok doing this.
> I just noticed from your patch that you set the size to 32-bits. Please
> set it to BITS_PER_WORD.
BITS_PER_WORD is not right. That is what prompted me to make the
change. There are a few things about the MIPS ABI:
1. We do follow the ABI part.
2. We care much less about the API part. That is in the section 6 where
wchar_t is defined.
3. On mips, sizeof (int) == sizeof (long int).
But BITS_PER_WORD can be 32 or 64, depending on TARGET_LONG64. As for
WCHAR_TYPE, it should be `int' regardless of TARGET_LONG64. For most of
the 64bit Linux targets, sizeof (int) should be 32bit. That means
WCHAR_TYPE_SIZE should be 32 for mips.