[Top] [All Lists]

Re: Changing WCHAR_TYPE from "long int" to "int"?

To: Eric Christopher <>
Subject: Re: Changing WCHAR_TYPE from "long int" to "int"?
From: "H . J . Lu" <>
Date: Mon, 6 Aug 2001 08:22:19 -0700
Cc:,, GNU C Library <>
In-reply-to: <>; from on Mon, Aug 06, 2001 at 03:12:56PM +0100
References: <> <>
User-agent: Mutt/1.2.5i
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.


<Prev in Thread] Current Thread [Next in Thread>