This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: mips/mips.h bug with WCHAR_TYPE?
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: mips/mips.h bug with WCHAR_TYPE?
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Wed, 28 Feb 2001 09:56:15 -0700
- CC: gcc-bugs at gcc dot gnu dot org, "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Organization: Rogue Wave Software, Inc.
- References: <20010227221950.H18697@daikokuya.demon.co.uk>
FYI: a similar inconsistency is/was in gcc 2.95.2 on AIX, where the patched
<stddef.h> defines wint_t to unsigned int while the system <ctype.h> (which
isn't replaced by gcc) defines wint_t to int. I've been meaning to submit a bug
report on this but haven't so far. Don't know if this is still a problem in the
latest sources.
Regards
Martin
$ grep -n wint_t /usr/include/ctype.h
101: typedef int wint_t;
127: extern int is_wctype(wint_t, wctype_t);
$ grep -n wint_t
/package/1/compilers/g++/2.95.2/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/include/stddef.h
5: || defined(__need_wint_t)
12: && !defined(__need_wint_t))
273:#if defined (_STDDEF_H) || defined (__need_wint_t)
280:typedef __WINT_TYPE__ wint_t;
282:#undef __need_wint_t
$ grep -n __WINT_TYPE__
/package/1/compilers/g++/2.95.2/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/include/stddef.h
277:#ifndef __WINT_TYPE__
278:#define __WINT_TYPE__ unsigned int
280:typedef __WINT_TYPE__ wint_t;
Neil Booth wrote:
>
> I think I've found what causes David's testsuite failures for wide
> characters. In mips/iris.h we have
>
> #define WCHAR_TYPE "long int"
> #define WCHAR_TYPE_SIZE LONG_TYPE_SIZE
>
> For -mabi=64, this is an 8-byte wide char! Surely you jest.
>
> I supect these should be
>
> #define WCHAR_TYPE "int"
> #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
>
> Would someone with more knowledge of MIPS please confirm or deny?
> Does this fix the bug for you David?
>
> Thanks,
>
> Neil.