Am Montag, dem 02.06.2025 um 13:19 -0500 schrieb Segher Boessenkool: > Hi! > > On Mon, Jun 02, 2025 at 05:50:08PM +0200, 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. > > Do you have any data showing that -Wextra is good for this warning > (and that -Wall is not)? -Wall should have essentially no false > positives, -Wextra is allowed to be a bit more annoying, but the > requirements for the two are essentially the same, just the limit > "this is *too* annoying" shifted a bit.
It would cause false positives, e.g. occasionally for the "goto fail" idiom in C, so I think it is not acceptable for -Wall. I based this also on the comments in the bug report. > > Why do this in -Wc++-compat at all? You don't say. Well, you say that > is a bugfix, so it should be a separate (and trivial) patch. It is a hard error in C++. It is also already documented as being activated by -Wc++-compat. I guess the trivial bug fix ("LangEnabledby -> LangEnabledBy") could be a separate "obviously correct" patch if there is no consensus to add the warning to -Wextra. Finally, I missed a tiny fix to "libbacktrace/elf.c" where this warning would trigger with -Wextra. Martin > > > Segher