On Fri, Nov 15, 2024 at 3:12 PM Jakub Jelinek <ja...@redhat.com> wrote:
>
> 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.
>

I prefer the "separate options: -Wend-labels, -Wdeclaration-labels" choice.

> 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 really don't like this trend of further use of the equals sign in
warning names; please just use simple separate option names instead of
a single option name with multiple operands. -Wc11-c23-compat can
still be an umbrella flag even with the regular option naming scheme,
just like -Wall and -Wextra already are.

>         Jakub
>

Reply via email to