On Thu, 11 Sep 2025, Alejandro Colomar wrote:

> Warn about this:
> 
>       void f(int x; int x; int x);
> 
> This would allow eventually adding another semicolon in function
> prototypes to separate a different feature.

I don't think that's a plausible future addition.  The small visual 
difference between comma and semicolon is one of the reasons people have 
given for objecting to this feature; adding extra features with multiple 
semicolons seems even more confusing, quite apart from being incompatible 
with the existing extension.

> So, make multiple lists of forward declarations of parameters
> obsolescent, and produce a new diagnostic,
> -Wmultiple-parameter-fwd-decl-lists, which diagnoses uses of this
> obsolescent syntax.

I'm dubious of obsolescence here.  Restricting to a single forward 
declaration list is one of many possible design choices for a subset of 
the feature to consider for the standard; it's a reasonable subset choice, 
but hardly a unique one.  If the feature were accepted into C2y with that 
particular subset, my inclination would be that cases outside that subset 
(i.e. multiple forward declaration lists) would then (continue to) get a 
pedwarn-if-pedantic, rather than any stronger form of obsolescence such as 
warning with -Wextra.  Having an additional option for this particular 
case is reasonable enough; it's treating it as obsolesence or including it 
in -Wextra that seems questionable.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to