diff mbox

PATCH][ARM][4.8]Backport "Fix definition of __ARM_SIZEOF_WCHAR_T"

Message ID 54B53F7C.5000902@arm.com
State New
Headers show

Commit Message

Renlin Li Jan. 13, 2015, 3:53 p.m. UTC
Hi all,

This is a backport patch for 
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213864

arm-none-eabi regression test has been done, no new issues.
Okay for branch 4.8?

gcc/ChangeLog
Fix PR target/61413
Backport from mainline.

2014-08-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

     PR target/61413
     * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition
     of __ARM_SIZEOF_WCHAR_T.

Comments

Richard Earnshaw Jan. 13, 2015, 3:54 p.m. UTC | #1
On 13/01/15 15:53, Renlin Li wrote:
> Hi all,
> 
> This is a backport patch for 
> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213864
> 
> arm-none-eabi regression test has been done, no new issues.
> Okay for branch 4.8?
> 
> gcc/ChangeLog
> Fix PR target/61413
> Backport from mainline.
> 
> 2014-08-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
> 
>      PR target/61413
>      * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition
>      of __ARM_SIZEOF_WCHAR_T.
> 
> 
> 
> backport.patch
> 
> 
> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
> index c0f2184..23333eb 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_with_int_value (				\
> -	  "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE);		\
> +	builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T",	\
> +				    wchar_type_node);		\
>  	if (TARGET_ARM_ARCH_PROFILE)				\
>  	  builtin_define_with_int_value (			\
>  	    "__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE);	\
> 

OK.
diff mbox

Patch

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index c0f2184..23333eb 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_with_int_value (				\
-	  "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE);		\
+	builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T",	\
+				    wchar_type_node);		\
 	if (TARGET_ARM_ARCH_PROFILE)				\
 	  builtin_define_with_int_value (			\
 	    "__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE);	\