This PR is a #21633 follow up.
Additionally, it makes --enable-suppress-external-warnings
the default configure
options, that allows to apply more -W
and -Werror
options to our own code (e.g., #21613).
This change allows to apply more -W and -Werror options to our own code.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
430@@ -431,17 +431,18 @@ if test "x$enable_werror" = "xyes"; then
431 AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]])
432 AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]])
433 AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]])
434- AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=conditional-uninitialized"],,[[$CXXFLAG_WERROR]])
Additionally, it makes –enable-suppress-external-warnings the default configure options,
I’m not sure why this is mentioned as a second line change, as this is the major change here. Also, if the defaults are being changed, shouldn’t some of the configure logic be reversed to only apply certain warnings in the now, non-default case? For now, I’m an approach NACK.
It would be great if you could summarize (maybe in a new issue or gist) what the end goals are with some of your current build system changes:
-Werror
by default at some point?
At the moment it seems like a very inconsistent/whack-a-mole type approach is being taken, mostly just to suppress warnings (sometimes at any cost. i.e #20824), but also sometimes disabling checks outright, or patching around them in our own code.
--enable-suppress-external-warnings
the default, but it should be better documented. Someone needs to be motivated to fix things upstream and/or notice problems when we update dependencies.
🕵️ @achow101 @sipa @practicalswift have been requested to review this pull request as specified in the REVIEWERS file.
hebasto
DrahtBot
fanquake
Sjors
Labels
Build system