This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fix Wunused-parm-3.C test suite failure on ARM EABI
- From: Mikael Pettersson <mikpe at it dot uu dot se>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 May 2010 22:25:40 +0200
- Subject: [PATCH] fix Wunused-parm-3.C test suite failure on ARM EABI
The Wunused-parm-3.C test case added recently as part of the C++ support
for -Wunused-but-set-{variable,parameter} fails unnecessarily on ARM EABI
because it uses va_list and gcc warns about a mangling change:
/home/mikpe/gcc-4.6-20100508/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C: In instantiation of 'T fn5(va_list) [with T = int, va_list = __va_list]':
/home/mikpe/gcc-4.6-20100508/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C:56:23: instantiated from here
/home/mikpe/gcc-4.6-20100508/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C:48:1: note: the mangling of 'va_list' has changed in GCC 4.4
FAIL: g++.dg/warn/Wunused-parm-3.C (test for excess errors)
The standard fix for this is to silence the warning by passing -Wno-psabi
on ARM EABI. The patch below does that and has been verified to eliminate
this regression on armv5tel-unknown-linux-gnueabi.
Ok for trunk? (I don't have svn write access.)
gcc/testsuite/
2010-05-10 Mikael Pettersson <mikpe@it.uu.se>
PR c/18624
* g++.dg/warn/Wunused-parm-3.C: Append -Wno-psabi to
options on arm_eabi targets.
--- gcc-4.6-20100508/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C.~1~ 2010-05-06 08:52:30.000000000 +0200
+++ gcc-4.6-20100508/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C 2010-05-10 21:34:43.000000000 +0200
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-Wunused -W" }
+// { dg-options "-Wunused -W -Wno-psabi" { target arm_eabi } }
#include <stdarg.h>