From: Mark Mitchell Date: Mon, 25 Jan 2010 03:14:25 +0000 (+0000) Subject: re PR c++/42748 (warnings about 'mangling of 'va_list' has changed in GCC 4.4' not... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d147cbd9029c1079d33efccc2b2dcfb98dd8b48d;p=gcc.git re PR c++/42748 (warnings about 'mangling of 'va_list' has changed in GCC 4.4' not suppressed in sytem headers) PR c++/42748 * config/arm/arm.c (arm_mangle_type): Do not warn about changes to mangling of va_list in system headers. PR c++/42748 * g++.dg/abi/arm_va_list2.C: New test. * g++.dg/abi/arm_va_list2.h: Companion header file. From-SVN: r156202 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a9602feec3c..c5902735097 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-01-24 Mark Mitchell + + PR c++/42748 + * config/arm/arm.c (arm_mangle_type): Do not warn about changes to + mangling of va_list in system headers. + 2010-01-23 Toon Moene * tree-predcom.c (combine_chains): Return NULL, not false. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e9ea2bd1ca0..ffff9ab2f87 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -21372,7 +21372,7 @@ arm_mangle_type (const_tree type) && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) { static bool warned; - if (!warned && warn_psabi) + if (!warned && warn_psabi && !in_system_header) { warned = true; inform (input_location, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b9dd12432d0..2b0cfc68d06 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-01-24 Mark Mitchell + + PR c++/42748 + * g++.dg/abi/arm_va_list2.C: New test. + * g++.dg/abi/arm_va_list2.h: Companion header file. + 2010-01-24 Paul Thomas PR fortran/41044 diff --git a/gcc/testsuite/g++.dg/abi/arm_va_list2.C b/gcc/testsuite/g++.dg/abi/arm_va_list2.C new file mode 100644 index 00000000000..f5e4ca43d30 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/arm_va_list2.C @@ -0,0 +1,7 @@ +// { dg-do compile } +// { dg-options "-Wpsabi" } +// { dg-require-effective-target arm_eabi } + +#include +#include "arm_va_list2.h" + diff --git a/gcc/testsuite/g++.dg/abi/arm_va_list2.h b/gcc/testsuite/g++.dg/abi/arm_va_list2.h new file mode 100644 index 00000000000..ebfb2deacbd --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/arm_va_list2.h @@ -0,0 +1,4 @@ +// The mangling of va_list changed in GCC 4.4. We want to warn about +// that -- but not in a system header. +#pragma GCC system_header +void f(va_list) {}