Turn on --enable-gcc-warnings-advisory by default
I've had multiple patches fail due to missing the --enable-gcc-warnings
flag in builds. I've also missed really important problems that these warnings would tell me about.
Turning on --enable-gcc-warnings
by default is probably not a good choice, because GCC warnings vary quite a lot between versions and -Werror
will cause these new warnings to break builds.
Without -Werror
, there's no harm in enabling all of these warnings by default, and this makes us more likely to notice important warnings. We should do it.
I suggest:
- Make the behavior of
--enable-gcc-warnings-advisory
default when supported by the compiler - Add an
--enable-fatal-warnings
option to turn on-Werror
- Alias
--enable-gcc-warnings
to--enable-fatal-warnings
for backwards compatibility - Deprecate or ignore
--enable-gcc-warnings-advisory
- Optionally, we could have a
--disable-extra-warnings
flag, if there's a case where someone wants to turn off these warnings