This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR 42748
- From: mitchell at codesourcery dot com (Mark Mitchell)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 Jan 2010 19:15:52 -0800 (PST)
- Subject: PATCH: PR 42748
- Reply-to: mark at codesourcery dot com
The C++ name-mangling for std::va_list changed in the ARM port when we
went to GCC 4.4. (This is intentional; the mangling now in used is
required by the ARM ABI.) We use "inform" to tell the user about
this, but, as usual, we don't want to do this in system headers. So,
this trivial patch makes us not warn in system headers.
Applied.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
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-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.
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c (revision 155915)
+++ gcc/config/arm/arm.c (working copy)
@@ -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,
popd
Index: gcc/testsuite/g++.dg/abi/arm_va_list2.C
===================================================================
--- gcc/testsuite/g++.dg/abi/arm_va_list2.C (revision 0)
+++ gcc/testsuite/g++.dg/abi/arm_va_list2.C (revision 0)
@@ -0,0 +1,7 @@
+// { dg-do compile }
+// { dg-options "-Wpsabi" }
+// { dg-require-effective-target arm_eabi }
+
+#include <stdarg.h>
+#include "arm_va_list2.h"
+
Index: gcc/testsuite/g++.dg/abi/arm_va_list2.h
===================================================================
--- gcc/testsuite/g++.dg/abi/arm_va_list2.h (revision 0)
+++ gcc/testsuite/g++.dg/abi/arm_va_list2.h (revision 0)
@@ -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) {}