re PR c++/42748 (warnings about 'mangling of 'va_list' has changed in GCC 4.4' not...
authorMark Mitchell <mark@codesourcery.com>
Mon, 25 Jan 2010 03:14:25 +0000 (03:14 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 25 Jan 2010 03:14:25 +0000 (03:14 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/arm_va_list2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/arm_va_list2.h [new file with mode: 0644]

index a9602feec3c60592b7c7df56856e0dc77fa8618f..c59027350970725ac74f27ebcb0b7e041669ff35 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-24  Mark Mitchell  <mark@codesourcery.com>
+
+       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  <toon@moene.org>
 
        * tree-predcom.c (combine_chains): Return NULL, not false.
index e9ea2bd1ca0cdcbb987094839f51fb00f71a0b78..ffff9ab2f87a60d7afb8b7d415be49586752f043 100644 (file)
@@ -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,
index b9dd12432d0a8e65b4cf9f81188e8d59cb108d13..2b0cfc68d06e35b5ca14bc8b27bb55c7362ec35b 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-24  Mark Mitchell  <mark@codesourcery.com>
+
+       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  <pault@gcc.gnu.org>
 
        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 (file)
index 0000000..f5e4ca4
--- /dev/null
@@ -0,0 +1,7 @@
+// { dg-do compile }
+// { dg-options "-Wpsabi" }
+// { dg-require-effective-target arm_eabi }
+
+#include <stdarg.h>
+#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 (file)
index 0000000..ebfb2de
--- /dev/null
@@ -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) {}