Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-18 Thread Joseph Myers
On Sat, 13 Sep 2025, Alejandro Colomar wrote: > @@ -675,7 +675,7 @@ declaration}, and it serves the purpose of making the > name @code{len} > known when the declaration of @code{data} is parsed. > > You can write any number of such parameter forward declarations in the > -parameter list. The

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 08:53:37PM +, Joseph Myers wrote: > On Mon, 15 Sep 2025, Alejandro Colomar wrote: > > > +You can write any number of such parameter forward declaration lists, > > +but using more than one is obsolete and unnecessary. > > I'm dubious of declaring it

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Joseph Myers
On Mon, 15 Sep 2025, Alejandro Colomar wrote: > +You can write any number of such parameter forward declaration lists, > +but using more than one is obsolete and unnecessary. I'm dubious of declaring it obsolete. -- Joseph S. Myers josmy...@redhat.com

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 09:34:13PM +0200, Alejandro Colomar wrote: > Hi Joseph, > > On Mon, Sep 15, 2025 at 06:57:23PM +, Joseph Myers wrote: > > On Sat, 13 Sep 2025, Alejandro Colomar wrote: > > > > > @@ -675,7 +675,7 @@ declaration}, and it serves the purpose of making the > >

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 06:57:23PM +, Joseph Myers wrote: > On Sat, 13 Sep 2025, Alejandro Colomar wrote: > > > @@ -675,7 +675,7 @@ declaration}, and it serves the purpose of making the > > name @code{len} > > known when the declaration of @code{data} is parsed. > > > > You ca

[PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-13 Thread Alejandro Colomar
Warn about this: void f(int x; int x; int x); Add a new diagnostic, -Wmultiple-parameter-fwd-decl-lists, which diagnoses uses of this obsolescent syntax. Add this diagnostic in -Wextra. Forward declarations of parameters are very rarely used. And functions that need two forward declara