diff options
| author | Vasil Dimov <[email protected]> | 2020-05-05 14:47:59 +0200 |
|---|---|---|
| committer | Vasil Dimov <[email protected]> | 2020-05-05 14:47:59 +0200 |
| commit | a30b0a24e97eae7f6d1428c5bf339a579872f28e (patch) | |
| tree | fb9cb4d2b6acabfbce26f68a1353b7e4529b681b | |
| parent | Merge #18782: wallet: Make sure no DescriptorScriptPubKeyMan or WalletDescrip... (diff) | |
| download | discoin-a30b0a24e97eae7f6d1428c5bf339a579872f28e.tar.xz discoin-a30b0a24e97eae7f6d1428c5bf339a579872f28e.zip | |
build: enable -Werror=gnu
Stop the build if a warning is emitted due to `-Wgnu` and
`--enable-werror` has been used. As usual - this would help notice such
a warning that is about to be introduced in new code.
This is a followup to
https://github.com/bitcoin/bitcoin/pull/18088
build: ensure we aren't using GNU extensions
| -rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6046b0561..369611e3b 100644 --- a/configure.ac +++ b/configure.ac @@ -338,6 +338,7 @@ if test "x$enable_werror" = "xyes"; then if test "x$CXXFLAG_WERROR" = "x"; then AC_MSG_ERROR("enable-werror set but -Werror is not usable") fi + AX_CHECK_COMPILE_FLAG([-Werror=gnu],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=gnu"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]]) |