On Mon, 2 Jun 2025, Martin Uecker wrote: > Am Montag, dem 02.06.2025 um 18:45 +0000 schrieb Joseph Myers: > > On Mon, 2 Jun 2025, Martin Uecker wrote: > > > > > According to the discussion in the bugzilla there seems to be > > > some consensus to activate the warning for -Wextra (I am also > > > looking into implementing the suggested improvements that may > > > make it suitable fo r-Wall). When making this change, I also > > > noticed that it was not working for -Wc++-compat due to a typo. > > > > What are the cases of interest where this detects buggy code that isn't > > detected by -Wmaybe-uninitialized (also included in -Wextra)? Is this > > about -O0 compilations? > > One example would be: > > void t(int *); > void m(void) > { > goto foo; > int i = 0; > foo: > t(&i); > }
Then I think something like that should be included as a testcase for the patch adding the option to -Wextra. -- Joseph S. Myers josmy...@redhat.com