On Sat, 16 Nov 2024, Florian Weimer wrote: > +@opindex Wdeprecated-non-prototype > +@opindex Wno-deprecated-non-prototype > +@item -Wdeprecated-non-prototype @r{(C and Objective-C only)} > +Warn if a function declarated with an empty parameter list @samp{()} is > +called with one or more arguments, or if a function definition with one > +or more parameters is encountered after such a declaration. Both cases > +are errors C23 and later dialects of C.
... are errors *in* C23 and later dialects of C. > diff --git a/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-1.c > b/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-1.c > new file mode 100644 > index 00000000000..c49baf72d8c > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-1.c > @@ -0,0 +1,24 @@ > +/* { dg-do compile } */ > +/* { dg-options "-Wdeprecated-non-prototype" } */ All the tests need explicit -std=gnu17, they'll be errors with -std=gnu23 (which I expect to make the default tonight). OK with those fixes. -- Joseph S. Myers josmy...@redhat.com