* Jakub Jelinek:

> On Fri, Nov 15, 2024 at 08:13:28PM +0100, Florian Weimer wrote:
>> * Andrew Pinski:
>> 
>> > On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer <fwei...@redhat.com> wrote:
>> >>
>> >> This is another recent GCC extension whose use is apparently
>> >> difficult to spot in code reviews.
>> >>
>> >> The name of the option is due to Jonathan Wakely.  Part of it
>> >> could apply to C++ as well (for labels at the end of a compound
>> >> statement).
>> >
>> > I like this idea of having an option here, though I am not a fan of
>> > the name of the option. When I saw `free`, I was not thinking of free
>> > flowing or free radicals but rather free as price (beer).
>> > I can't think of a good alternative though.
>> 
>> If we don't see C++ support coming, we could use -Wc23-labels.
>> Otherwise -Wflexible-labels, -Wunrestricted-labels, -Wenhanced-labels …
>> Or separate options: -Wend-labels, -Wdeclaration-labels.  But I don't
>> think anyone would want to treat those two cases differently.
>
> So, wouldn't it be better when splitting -Wc11-c23-compat option into pieces
> represent those as operands -Wc11-c23-compat=unnamed-parameters,labels,...
> where -Wc11-c23-compat would stand for all the subparts?

I've got a patch for -Wdeprecated-non-prototype, which is already part
of Clang and warns about C23 incompatibilities related to () in function
declarations.  That option doesn't fit the -Wc11-c23-compat=… suboptions
model.  Admitttedly, I don't know how to implement those suboptions
anyway. 8-)

Thanks,
Florian

Reply via email to