mips/mips.h bug with WCHAR_TYPE?
Martin Sebor
sebor@roguewave.com
Wed Feb 28 08:58:00 GMT 2001
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.
More information about the Gcc-bugs
mailing list