On Tue, Jun 3, 2025 at 11:06 AM Joseph Myers <josmy...@redhat.com> wrote:
>
> On Tue, 3 Jun 2025, Martin Uecker wrote:
>
> > This version only contains the fix for -Wc++-compat.
> >
> > Bootstrapped and regression tested for x86_64.
> >
> > Martin
> >
> >
> >     c: Enable -Wjump-misses-init for -Wc++-compat
> >
> >     Fix a typo that prevented the warning from being activated with 
> > -Wc++compat.
> >
> >     gcc/c-family/ChangeLog:
> >             * c.opts (Wjump-misses-init): Fix typo.
> >
> >     gcc/testsuite/ChangeLog:
> >             * gcc.dg/Wjump-misses-init-3.c: New test.
>
> OK.
>
> Note 1: the opt*.awk scripts aren't generally very good at error checking.
> If we don't already have a bug open for missing checks for unknown
> keywords such as "LangEnabledby", one should be filed.

I have a patch which should catch at least the wrong case typo which I
should be submitting after the typo fix goes in.

In this case we get:
```
options.cc:1:2: error: #error incorrect case of 'LangEnabledBy' during
parsing of C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C
ObjC,Wc++-compat)
    1 | #error incorrect case of 'LangEnabledBy' during parsing of  C
ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C
ObjC,Wc++-compat)
      |  ^~~~~
```
Which should be a good hint of what is going wrong.

Thanks,
Andrew

>
> Note 2: I'm not sure what -Wc++-compat is meant to do with C code using
> features that are only in newer C++ versions, such as the label at the end
> of a compound statement in the new test (a new feature in C23 and C++23).
> But adding a semicolon there would avoid any question about whether
> -Wc++-compat should also be warning about that label or not.
>
> --
> Joseph S. Myers
> josmy...@redhat.com
>

Reply via email to