public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C
@ 2011-05-24 18:52 Janis Johnson
  2011-05-24 21:46 ` Mike Stump
  0 siblings, 1 reply; 3+ messages in thread
From: Janis Johnson @ 2011-05-24 18:52 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

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?

[-- Attachment #2: gcc-20110524-2 --]
[-- Type: text/plain, Size: 731 bytes --]

2011-05-24  Janis Johnson  <janisjo@codesourcery.com>

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

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));
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C
  2011-05-24 18:52 [testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C Janis Johnson
@ 2011-05-24 21:46 ` Mike Stump
  2011-05-24 22:30   ` Janis Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Stump @ 2011-05-24 21:46 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc-patches

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C
  2011-05-24 21:46 ` Mike Stump
@ 2011-05-24 22:30   ` Janis Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Janis Johnson @ 2011-05-24 22:30 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-24 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 18:52 [testsuite] ignore irrelevant warning in g++.dg/abi/packed1.C Janis Johnson
2011-05-24 21:46 ` Mike Stump
2011-05-24 22:30   ` Janis Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).