diff mbox

[testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C

Message ID 4DDBEDE7.3000009@codesourcery.com
State New
Headers show

Commit Message

Janis Johnson May 24, 2011, 5:41 p.m. UTC
Test g++.dg/abi/packed1.C triggers a warning for several targets.  That
warning is not relevant to the purpose of the test, as shown by the fact
that the dg-warning directive was added later and additional targets
keep trickling in.  Rather than continue to add to the list of targets
for the warning, this patch ignores the warning when it appears.

Tested on arm-none-linux-gnueabi.  OK for trunk and 4.6?
2011-05-24  Janis Johnson  <janisjo@codesourcery.com>

	* g++.dg/abi/packed1.C: Ignore warning.

Comments

Mike Stump May 24, 2011, 8:40 p.m. UTC | #1
On May 24, 2011, at 10:41 AM, Janis Johnson wrote:
> Test g++.dg/abi/packed1.C triggers a warning for several targets.

> OK for trunk and 4.6?

Ok.  If there is a portable -Wno-inefficient flag, that'd be a slightly better way to do this.
Janis Johnson May 24, 2011, 9:34 p.m. UTC | #2
On 05/24/2011 01:40 PM, Mike Stump wrote:
> On May 24, 2011, at 10:41 AM, Janis Johnson wrote:
>> Test g++.dg/abi/packed1.C triggers a warning for several targets.
> 
>> OK for trunk and 4.6?
> 
> Ok.  If there is a portable -Wno-inefficient flag, that'd be a slightly better way to do this.

-Wno-attributes suppresses the warning, I can use that.

Janis
diff mbox

Patch

Index: g++.dg/abi/packed1.C
===================================================================
--- g++.dg/abi/packed1.C	(revision 174094)
+++ g++.dg/abi/packed1.C	(working copy)
@@ -1,10 +1,12 @@ 
 // PR c++/41788
 // { dg-options "-Wpacked" }
 // { dg-do run }
+// Ignore a warning that is irrelevant to the purpose of this test.
+// { dg-prune-output "inefficient.*vptr" }
 
 extern "C" void abort ();
 
-struct INNER { // { dg-warning "inefficient.*vptr" "" { target alpha*-*-* ia64-*-* hppa*-*-* mips-sgi-irix* sparc*-*-* spu-*-* sh*-*-* } }
+struct INNER {
   virtual int foo() const { return 1; }
 } __attribute__ ((packed));