Re: [PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Joseph Myers
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

[PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Florian Weimer
This warning covers the C23 incompibilities resulting from using () as parameter lists in function declarations. The warning name comes from Clang. The implementation is not perfect because GCC treats these two declarations as equivalent: void f (); void f (not_a_type); This is a bit confus