public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc.dg/Wmissing-parameter-type*: Test the intended warning
@ 2023-11-08  8:53 Florian Weimer
  2023-11-08 15:00 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2023-11-08  8:53 UTC (permalink / raw)
  To: gcc-patches

gcc/testsuite/ChangeLog:

	* gcc.dg/Wmissing-parameter-type.c: Build with -std=gnu89
        to trigger the -Wmissing-parameter-type warning
	and not the default -Wimplicit warning.  Also match
	against -Wmissing-parameter-type.
	* gcc.dg/Wmissing-parameter-type.c: Likewise.

---
 gcc/testsuite/gcc.dg/Wmissing-parameter-type-Wextra.c | 4 ++--
 gcc/testsuite/gcc.dg/Wmissing-parameter-type.c        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/Wmissing-parameter-type-Wextra.c b/gcc/testsuite/gcc.dg/Wmissing-parameter-type-Wextra.c
index 37e1a571bda..2cd28a2ecd1 100644
--- a/gcc/testsuite/gcc.dg/Wmissing-parameter-type-Wextra.c
+++ b/gcc/testsuite/gcc.dg/Wmissing-parameter-type-Wextra.c
@@ -1,7 +1,7 @@
 /* Test -Wmissing-parameter-type is enabled by -Wextra */
 /* { dg-do compile } */
-/* { dg-options "-Wextra" } */
+/* { dg-options "-std=gnu89 -Wextra" } */
 
-int foo(bar) { return bar;} /* { dg-warning "type of 'bar' defaults to 'int'" } */
+int foo(bar) { return bar;} /* { dg-warning "type of 'bar' defaults to 'int' \\\[-Wmissing-parameter-type\\\]" } */
 
 
diff --git a/gcc/testsuite/gcc.dg/Wmissing-parameter-type.c b/gcc/testsuite/gcc.dg/Wmissing-parameter-type.c
index 8ec94e2caf7..b25e8d21602 100644
--- a/gcc/testsuite/gcc.dg/Wmissing-parameter-type.c
+++ b/gcc/testsuite/gcc.dg/Wmissing-parameter-type.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-Wmissing-parameter-type" } */
+/* { dg-options "-std=gnu89 -Wmissing-parameter-type" } */
 
-int foo(bar) { return bar; } /* { dg-warning "type of 'bar' defaults to 'int'" } */
+int foo(bar) { return bar; } /* { dg-warning "type of 'bar' defaults to 'int' \\\[-Wmissing-parameter-type\\\]" } */
 
 

base-commit: e9107464bb24f77038ad042ba858abed4ca060c0


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

* Re: [PATCH] gcc.dg/Wmissing-parameter-type*: Test the intended warning
  2023-11-08  8:53 [PATCH] gcc.dg/Wmissing-parameter-type*: Test the intended warning Florian Weimer
@ 2023-11-08 15:00 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-11-08 15:00 UTC (permalink / raw)
  To: Florian Weimer, gcc-patches



On 11/8/23 01:53, Florian Weimer wrote:
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/Wmissing-parameter-type.c: Build with -std=gnu89
>          to trigger the -Wmissing-parameter-type warning
> 	and not the default -Wimplicit warning.  Also match
> 	against -Wmissing-parameter-type.
> 	* gcc.dg/Wmissing-parameter-type.c: Likewise.
OK
jeff

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

end of thread, other threads:[~2023-11-08 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-08  8:53 [PATCH] gcc.dg/Wmissing-parameter-type*: Test the intended warning Florian Weimer
2023-11-08 15:00 ` Jeff Law

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