From a9fcd9b1ecb8954f67738a94b8553ab234d6def5 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 28 Aug 2012 21:20:56 +0800 Subject: Disable warning: the mangling of has changed in GCC 4.4 Disable this obsolete warning for Android, because none of the exposed APIs NDK is impacted by this change of ARM ABI. This warning can be triggered very easily by compiling the following code using arm-linux-androideabi-g++: typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; void foo(va_list v) { } We could advise developer to add "-Wno-psabi", but doing so also categorically deny other cases guarded by "warn_psabi". Hence the decision to disable it case by case here. Related discussion: https://groups.google.com/d/msg/android-ndk/-/7XLgL08iv0sJ Change-Id: I2c5c42e4593d3a1806f7840ccaa3e59d8d1c2315 --- gcc-4.6/gcc/config/arm/arm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc-4.6') diff --git a/gcc-4.6/gcc/config/arm/arm.c b/gcc-4.6/gcc/config/arm/arm.c index a6cce8b00..04d88e8cb 100644 --- a/gcc-4.6/gcc/config/arm/arm.c +++ b/gcc-4.6/gcc/config/arm/arm.c @@ -23083,6 +23083,18 @@ arm_mangle_type (const_tree type) if (TARGET_AAPCS_BASED && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) { + /* Disable this obsolete warning for Android, because none of the exposed APIs + by NDK is impacted by this change of ARM ABI. This warning can be triggered + very easily by compiling the following code using arm-linux-androideabi-g++: + + typedef __builtin_va_list __gnuc_va_list; + typedef __gnuc_va_list va_list; + void foo(va_list v) { } + + We could advise developer to add "-Wno-psabi", but doing so also categorically + deny other cases guarded by "warn_psabi". Hence the decision to disable it + case by case here. + static bool warned; if (!warned && warn_psabi && !in_system_header) { @@ -23090,6 +23102,7 @@ arm_mangle_type (const_tree type) inform (input_location, "the mangling of % has changed in GCC 4.4"); } + */ return "St9__va_list"; } -- cgit v1.2.3