linux-mips
[Top] [All Lists]

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

To: Eric Christopher <echristo@redhat.com>
Subject: Re: Changing WCHAR_TYPE from "long int" to "int"?
From: "H . J . Lu" <hjl@lucon.org>
Date: Mon, 6 Aug 2001 08:22:19 -0700
Cc: gcc@gcc.gnu.org, linux-mips@oss.sgi.com, GNU C Library <libc-alpha@sourceware.cygnus.com>
In-reply-to: <997107178.1253.7.camel@ghostwheel.cygnus.com>; from echristo@redhat.com on Mon, Aug 06, 2001 at 03:12:56PM +0100
References: <20010805094806.A3146@lucon.org> <997107178.1253.7.camel@ghostwheel.cygnus.com>
Sender: owner-linux-mips@oss.sgi.com
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.


H.J.

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