Hi all,

According to ACLE 2.0, the value of __ARM_SIZEOF_WCHAR_T should be defined in terms of byte, which means it should be 2 or 4. This patch corrects the error in arm backend.

arm-none-eabi regression test has been done, no new issues.

Okay for trunk?


Regards,
Renlin Li

gcc/ChangeLog:

2014-12-16 Renlin Li <renlin...@arm.com>

        * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Correct
        __ARM_SIZEOF_WCHAR_T macro definition.

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index d850982..2c57182 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -74,8 +74,8 @@ extern char arm_arch_name[];
 	builtin_define_with_int_value (				\
 	  "__ARM_SIZEOF_MINIMAL_ENUM",				\
 	  flag_short_enums ? 1 : 4);				\
-	builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T",	\
-				    wchar_type_node);		\
+	builtin_define_with_int_value ("__ARM_SIZEOF_WCHAR_T",	\
+					WCHAR_TYPE_SIZE / 8);	\
 	if (TARGET_ARM_ARCH_PROFILE)				\
 	  builtin_define_with_int_value (			\
 	    "__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE);	\

Reply via email to