mips/mips.h bug with WCHAR_TYPE?

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com
Tue Feb 27 23:07:00 GMT 2001


This patch has been tested on mips-sgi-irix6.5 for the 3.0 branch.  It
eliminates 33 gcc testsuite failures with -mabi=64.  Can someone please
approve it and check it in.  It should also be applied to the mainline too,
but I haven't tested that.

2001-02-27  David Billinghurst

	* config/mips/iris5.h  Change WCHAR_TYPE to int

 Index: gcc/config/mips/iris5.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/iris5.h,v
retrieving revision 1.8
diff -u -r1.8 iris5.h
--- iris5.h     2000/11/02 23:29:11     1.8
+++ iris5.h     2001/02/28 06:58:11
@@ -51,9 +51,9 @@
 #undef WCHAR_TYPE_SIZE
 #undef MAX_WCHAR_TYPE_SIZE
 
-#define WCHAR_TYPE     "long int"
-#define WCHAR_TYPE_SIZE        LONG_TYPE_SIZE
-#define MAX_WCHAR_TYPE_SIZE    MAX_LONG_TYPE_SIZE
+#define WCHAR_TYPE     "int"
+#define WCHAR_TYPE_SIZE        INT_TYPE_SIZE
+#define MAX_WCHAR_TYPE_SIZE    MAX_INT_TYPE_SIZE
 
 #define WORD_SWITCH_TAKES_ARG(STR)                     \
  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                  \


> -----Original Message-----
> From:	Neil Booth [SMTP:neil@daikokuya.demon.co.uk]
> Sent:	Wednesday, 28 February 2001 9:20
> To:	gcc-bugs@gcc.gnu.org
> Cc:	Billinghurst, David (CRTS)
> Subject:	mips/mips.h bug with WCHAR_TYPE?
> 
> 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