This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR target/53539: Different __WCHAR_TYPE__/wchar_t for gcc -m32 on Linux/i386 and Linux/x86-64
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Thu, 31 May 2012 06:35:19 -0700
- Subject: PATCH: PR target/53539: Different __WCHAR_TYPE__/wchar_t for gcc -m32 on Linux/i386 and Linux/x86-64
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch makes __WCHAR_TYPE__/wchar_t the same for gcc -m32 on
Linux/i386 and Linux/x86-64. OK for trunk?
Thanks.
H.J.
----
2012-05-31 H.J. Lu <hongjiu.lu@intel.com>
PR target/53539
* config/i386/gnu-user.h (WCHAR_TYPE): Use "int".
(WCHAR_TYPE_SIZE): Set to 32.
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index 9020be9..f88cbad 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -53,10 +53,10 @@ along with GCC; see the file COPYING3. If not see
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
-#define WCHAR_TYPE "long int"
+#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE BITS_PER_WORD
+#define WCHAR_TYPE_SIZE 32
/* Provide a LINK_SPEC appropriate for GNU userspace. Here we provide support
for the special GCC options -static and -shared, which allow us to