build: make –enable-werror just -Werror #23149

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:make_enable_werror_full_werror changing 1 files +5 −24
  1. fanquake commented at 3:31 am on October 1, 2021: member

    No longer special case a set of warnings, to make up our own -Werror, just use -Werror outright. This shouldn’t really have any effect on existing builders, who were already using --enable-werror, and is more inline with what they would expect --enable-werror to be, which is erroring on any/all warnings.

    We keep -Wno-error=return-type because we know that is broken when using mingw-w64. It should only be applied when cross-compiling for Windows.

    Similar to the change in #20544, but with (hopefully) less work-arounds, and other bundled changes. A step towards some configure “cleanups”.

  2. build: make --enable-werror just -Werror
    No longer special case a set of warnings, to make up our own -Werror,
    just use -Werror outright. This shouldn't really have any effect on
    existing builders, who were already using --enable-werror, and is more
    inline with what they would expect --enable-werror to be, which is
    erroring on any/all warnings.
    
    We keep -Wno-error=return-type because we know that is broken when using
    mingw-w64. It should only be applied when cross-compiling for Windows.
    
    Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
    38fd709fa5
  3. fanquake added the label Build system on Oct 1, 2021
  4. laanwj commented at 6:51 am on October 1, 2021: member
    I think the reason for having a closed, well-defined set of warnings for Werror is that, say, gcc may introduce a (possibily silly) new warning in a new version and we don’t want to get “build error” reports for that. This makes every singly warning into something we need to fix. It’s the general problem with Werror of course.
  5. fanquake commented at 7:20 am on October 1, 2021: member

    I think the reason for having a closed, well-defined set of warnings for Werror is that, say, gcc may introduce a (possibily silly) new warning in a new version and we don’t want to get “build error” reports for that. This makes every singly warning into something we need to fix. It’s the general problem with Werror of course.

    I agree, and argued somewhat against a similar change to this in #20544 with similar reasoning, especially since there seemed to be misunderstanding around the fact that repeating warning flags for -Werror= usage was not “duplication”. I’m also certainly not in the camp that thinks everything must be built with -Werror at any cost, which is has led us down this path of a mash of hacks/pragmas/suppressions etc, across our source, build system and CI, just to try and kill every warning.

    However, at the same time, I think what we are currently doing is somewhat unclear. What warrants being added to -Werror= or not? There are environments where you could build master with --enable-werror right now, and it would fail (i.e macOS, as we can’t seem to recreate -Wsign-compare warnings in the CI). This has been muddied even further with the use of --enable-suppress-external-warnings, as in most cases now you couldn’t use --enable-werror without that anyways.

    I think the risk of disruption in the CI from newly introduced compiler warnings is low, not only due to us having plenty of lead time to fix them if they are legitimate, but also because I think the likelihood of Clang or GCC introducing some horrible new warning spew is also fairly low, given the number of projects that build with -Werror by default.

  6. MarcoFalke commented at 7:28 am on October 1, 2021: member

    This makes every singly warning into something we need to fix. It’s the general problem with Werror of course.

    I think people will complain even when the warning doesn’t result in an error. So there is always some action we need to take. Whether that is a code fix, a -Wno, a --suppress-external, or something else…

  7. DrahtBot commented at 6:06 pm on October 1, 2021: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #21458 (build: Add -Werror=unused… compile flags by hebasto)
    • #15112 (build: Optionally enable -Wzero-as-null-pointer-constant by Empact)

    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.

  8. katesalazar commented at 3:59 pm on October 3, 2021: contributor

    I think people will complain even when the warning doesn’t result in an error.

    Of course people will complain, but you could want to defer taking care of them to post feature freeze.

  9. laanwj commented at 6:08 pm on October 5, 2021: member
    Right, it’s much less urgent if it doesn’t break the build. I didn’t really mean that the complaining is the probem, but the fact there is a build error.
  10. MarcoFalke added the label DrahtBot Guix build requested on Oct 6, 2021
  11. fanquake commented at 11:56 pm on October 7, 2021: member

    Guix build:

     0bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     157bbb9c3cd2f9a8c236220c7cafe247c9ae23061d53ece6ce276bb560f96bf0d  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/SHA256SUMS.part
     202764ffcd00c714594b2a1fc76433314d2c4ef09a213dc588548ff855335aeb7  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/bitcoin-38fd709fa5b7-aarch64-linux-gnu-debug.tar.gz
     3d25df1401b6c2542ebd1396203d87936b515f949b22be57075be297d2a66e1ad  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/bitcoin-38fd709fa5b7-aarch64-linux-gnu.tar.gz
     4198f72e906ab40091bae6792b4a087ef39ea6b2289aa1565c56a5c91f0993030  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/SHA256SUMS.part
     5788da825b9ea310bc1f21d7078b07d283166c519ec078765bbb28f0964c66223  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/bitcoin-38fd709fa5b7-arm-linux-gnueabihf-debug.tar.gz
     6cb8500702faa05378afd1c90419312926bb89f77bc12e5080dd688001065d490  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/bitcoin-38fd709fa5b7-arm-linux-gnueabihf.tar.gz
     742996d23fbd9860bcd5d9531568be2be0253d085ac88e6e200be1c2b7b9226a6  guix-build-38fd709fa5b7/output/dist-archive/bitcoin-38fd709fa5b7.tar.gz
     89a4e4e5648c8a882297ace93ba8ae7e7e8a12c12ebf19e6d109d57dce9e5d5c7  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/SHA256SUMS.part
     9102c4776f27a166a608026cbbbc4130c64fa0dd59dbbfe77c4efc51290b396a4  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/bitcoin-38fd709fa5b7-powerpc64-linux-gnu-debug.tar.gz
    1075033b1f6cf42428b493753e20e2a9b1704930be78b12ebf189253ffbfac6d68  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/bitcoin-38fd709fa5b7-powerpc64-linux-gnu.tar.gz
    117a40cda7bf0ecbb534657236dcb9c566f39cb707b47d4dc490b30142688a6521  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/SHA256SUMS.part
    12238a21da145afb5219687c0168c8fa109210a7644a36c1b695add5f6752b60ca  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/bitcoin-38fd709fa5b7-powerpc64le-linux-gnu-debug.tar.gz
    130eb85e09d2e72aa2708ffc7653ec7880d6e9b66a6478d43694b57df4bbbe2ebf  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/bitcoin-38fd709fa5b7-powerpc64le-linux-gnu.tar.gz
    14464c41eebccabe01f8eee62da27f4482b79b080ee4f99d14ddb16e57293aea87  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/SHA256SUMS.part
    159111778ab8a80a68ef6ecd765ed3508bba7914c1dd526efbfe301722e024c61e  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/bitcoin-38fd709fa5b7-riscv64-linux-gnu-debug.tar.gz
    166e47d9f8228beff0f6ebbcef4efed4a4b941f1f39b1668e8d32adce1a291a067  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/bitcoin-38fd709fa5b7-riscv64-linux-gnu.tar.gz
    17fa2198463145e47f4f49069beedd852c134fefb485667a015c5a3920726e4f2b  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/SHA256SUMS.part
    1829cec31f43dfe883ac03ff4d45661580248c16227414b5dad09172edccec1792  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx-unsigned.dmg
    19e6bd9fb4e180d9ce90e37e3a07b079336c370bbb98bf6a3beae87b1055de8819  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx-unsigned.tar.gz
    208c4f8aa7e3dde5acd9611c4d627c397ff885196b8e7b6467a57d0de9a8136ca7  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx64.tar.gz
    21d8b0678c38a0ba16c23ef69bad7fbdce3d0443e41a10f900cc78d5276c9535b3  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/SHA256SUMS.part
    2222c556fc765a60445927689948799d87608ca6451abc5ed91e4170d52569957e  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/bitcoin-38fd709fa5b7-x86_64-linux-gnu-debug.tar.gz
    236936bc7521fffd9ea4d62991dd816f21d4b63529b9bbbeabfda9c93b6abe403c  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/bitcoin-38fd709fa5b7-x86_64-linux-gnu.tar.gz
    24f03c2a8786b1d0639f6cfcc8a09c046bbfaa7e64bfe83a4dbf57f2e7221c8694  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/SHA256SUMS.part
    2554db1a703e8ba93021657e4891214b310adb6311e6c8af02a99f9f6132f83922  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win-unsigned.tar.gz
    268103f60e038f9d618f2c9fafbdcc0955c4d632539ef3782315a889cc6db11872  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64-debug.zip
    278f26c2e33273ce7291c453b76365723852dd18fca80441f992664065879df5e1  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64-setup-unsigned.exe
    28bbe860791669f86bf3c6edcb7683e016f192d003bec15c9c141f7dfae3d11160  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64.zip
    
  12. DrahtBot commented at 6:49 pm on October 8, 2021: member

    Guix builds

    File commit 113b863f0773999497f952daa6539a03a66a9de3(master) commit bac64266a866e09b52c4773e5880a43f2cd38391(master and this pull)
    SHA256SUMS.part cef142e76613e81b... 40f75694aba23b7a...
    *-aarch64-linux-gnu-debug.tar.gz adc3d28770776aef... 74d8171ccd9f1ec4...
    *-aarch64-linux-gnu.tar.gz 98d5eefedff98988... 4c709f81c865412d...
    *-arm-linux-gnueabihf-debug.tar.gz f6039364f26dc133... c6ca5a74eac251de...
    *-arm-linux-gnueabihf.tar.gz 0c5c55979203b62a... 9023b63dacf370cc...
    *-osx-unsigned.dmg ec644de45a41ea59... 12bd66abf0ab82fa...
    *-osx-unsigned.tar.gz 913228fa5ae5f6cc... 48e137702da4b133...
    *-osx64.tar.gz ec065732196d4d84... bb83d84c582ed865...
    *-powerpc64-linux-gnu-debug.tar.gz 5ac7cc1a4a23bce9... 3e4904aed0effc53...
    *-powerpc64-linux-gnu.tar.gz 65acd05354b5d45f... a0827043707893c1...
    *-powerpc64le-linux-gnu-debug.tar.gz 58a17617fc3bce0b... 8de23ccf798471da...
    *-powerpc64le-linux-gnu.tar.gz 51803987d606fe8f... 8528142a125fe766...
    *-riscv64-linux-gnu-debug.tar.gz 1a6a587ac8d82232... 164570f0f9348791...
    *-riscv64-linux-gnu.tar.gz 2dd1e3a266c00d59... 6254b1a2229ad0ce...
    *-win-unsigned.tar.gz 8766d679ac4fda9e... 06ba1e45796b8a4a...
    *-win64-debug.zip a0ff6a43a6b029e3... 48d7fb1050aed11b...
    *-win64-setup-unsigned.exe 59c2e6aa554a9ce5... 273d70cbc352a7fc...
    *-win64.zip d445bf1337e6ca11... 6314e30d267346d1...
    *-x86_64-linux-gnu-debug.tar.gz 8463e1b9f1a8bba6... 0bd28722887e82b2...
    *-x86_64-linux-gnu.tar.gz e9533a964c50a19f... 80dbb791586ff3b4...
    *.tar.gz d20968f10addb58f... 60cbdec4c8c9879c...
    guix_build.log db438b6542214e61... 9d8b804d6da74d97...
    guix_build.log.diff 73e577c5df42fd53...
  13. DrahtBot removed the label DrahtBot Guix build requested on Oct 8, 2021
  14. hebasto commented at 10:44 am on October 11, 2021: member

    However, at the same time, I think what we are currently doing is somewhat unclear. What warrants being added to -Werror= or not? There are environments where you could build master with --enable-werror right now, and it would fail (i.e macOS, as we can’t seem to recreate -Wsign-compare warnings in the CI). This has been muddied even further with the use of --enable-suppress-external-warnings, as in most cases now you couldn’t use --enable-werror without that anyways.

    Concept ACK.

    #20544 (comment):

    Closed in favor of #23149.

  15. hebasto approved
  16. hebasto commented at 12:22 pm on October 11, 2021: member

    ACK 38fd709fa5b7a01f149a65efdfe1a6b463477e4e (also see #23149 (comment)), tested:

    • on Linux Mint 20.2 (x86_64):
    0$ ./configure --without-bdb --enable-suppress-external-warnings --enable-werror CC=clang-12 CXX=clang++-12 && make clean && make
    1# ok
    2$ ./configure --without-bdb --enable-werror CC=clang-12 CXX=clang++-12 && make clean && make
    3# [-Werror,-Wsuggest-override] errors as expected
    4$ ./configure --without-bdb --without-gui --enable-werror CC=clang-12 CXX=clang++-12 && make clean && make
    5# ok
    6$ ./configure --without-bdb --enable-suppress-external-warnings --enable-werror CC=gcc-10 CXX=g++-10 && make clean && make
    7# ok
    8$ ./configure --without-bdb --enable-werror CC=gcc-10 CXX=g++-10 && make clean && make
    9# ok
    
    • on macOS 11.6 (20G165, Intel):
    0% ./configure --enable-suppress-external-warnings --enable-werror && make clean && make
    1# ok
    
  17. hebasto commented at 3:32 pm on October 11, 2021: member

    Guix builds:

     0$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     157bbb9c3cd2f9a8c236220c7cafe247c9ae23061d53ece6ce276bb560f96bf0d  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/SHA256SUMS.part
     202764ffcd00c714594b2a1fc76433314d2c4ef09a213dc588548ff855335aeb7  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/bitcoin-38fd709fa5b7-aarch64-linux-gnu-debug.tar.gz
     3d25df1401b6c2542ebd1396203d87936b515f949b22be57075be297d2a66e1ad  guix-build-38fd709fa5b7/output/aarch64-linux-gnu/bitcoin-38fd709fa5b7-aarch64-linux-gnu.tar.gz
     4198f72e906ab40091bae6792b4a087ef39ea6b2289aa1565c56a5c91f0993030  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/SHA256SUMS.part
     5788da825b9ea310bc1f21d7078b07d283166c519ec078765bbb28f0964c66223  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/bitcoin-38fd709fa5b7-arm-linux-gnueabihf-debug.tar.gz
     6cb8500702faa05378afd1c90419312926bb89f77bc12e5080dd688001065d490  guix-build-38fd709fa5b7/output/arm-linux-gnueabihf/bitcoin-38fd709fa5b7-arm-linux-gnueabihf.tar.gz
     742996d23fbd9860bcd5d9531568be2be0253d085ac88e6e200be1c2b7b9226a6  guix-build-38fd709fa5b7/output/dist-archive/bitcoin-38fd709fa5b7.tar.gz
     89a4e4e5648c8a882297ace93ba8ae7e7e8a12c12ebf19e6d109d57dce9e5d5c7  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/SHA256SUMS.part
     9102c4776f27a166a608026cbbbc4130c64fa0dd59dbbfe77c4efc51290b396a4  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/bitcoin-38fd709fa5b7-powerpc64-linux-gnu-debug.tar.gz
    1075033b1f6cf42428b493753e20e2a9b1704930be78b12ebf189253ffbfac6d68  guix-build-38fd709fa5b7/output/powerpc64-linux-gnu/bitcoin-38fd709fa5b7-powerpc64-linux-gnu.tar.gz
    117a40cda7bf0ecbb534657236dcb9c566f39cb707b47d4dc490b30142688a6521  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/SHA256SUMS.part
    12238a21da145afb5219687c0168c8fa109210a7644a36c1b695add5f6752b60ca  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/bitcoin-38fd709fa5b7-powerpc64le-linux-gnu-debug.tar.gz
    130eb85e09d2e72aa2708ffc7653ec7880d6e9b66a6478d43694b57df4bbbe2ebf  guix-build-38fd709fa5b7/output/powerpc64le-linux-gnu/bitcoin-38fd709fa5b7-powerpc64le-linux-gnu.tar.gz
    14464c41eebccabe01f8eee62da27f4482b79b080ee4f99d14ddb16e57293aea87  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/SHA256SUMS.part
    159111778ab8a80a68ef6ecd765ed3508bba7914c1dd526efbfe301722e024c61e  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/bitcoin-38fd709fa5b7-riscv64-linux-gnu-debug.tar.gz
    166e47d9f8228beff0f6ebbcef4efed4a4b941f1f39b1668e8d32adce1a291a067  guix-build-38fd709fa5b7/output/riscv64-linux-gnu/bitcoin-38fd709fa5b7-riscv64-linux-gnu.tar.gz
    17fa2198463145e47f4f49069beedd852c134fefb485667a015c5a3920726e4f2b  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/SHA256SUMS.part
    1829cec31f43dfe883ac03ff4d45661580248c16227414b5dad09172edccec1792  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx-unsigned.dmg
    19e6bd9fb4e180d9ce90e37e3a07b079336c370bbb98bf6a3beae87b1055de8819  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx-unsigned.tar.gz
    208c4f8aa7e3dde5acd9611c4d627c397ff885196b8e7b6467a57d0de9a8136ca7  guix-build-38fd709fa5b7/output/x86_64-apple-darwin19/bitcoin-38fd709fa5b7-osx64.tar.gz
    21d8b0678c38a0ba16c23ef69bad7fbdce3d0443e41a10f900cc78d5276c9535b3  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/SHA256SUMS.part
    2222c556fc765a60445927689948799d87608ca6451abc5ed91e4170d52569957e  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/bitcoin-38fd709fa5b7-x86_64-linux-gnu-debug.tar.gz
    236936bc7521fffd9ea4d62991dd816f21d4b63529b9bbbeabfda9c93b6abe403c  guix-build-38fd709fa5b7/output/x86_64-linux-gnu/bitcoin-38fd709fa5b7-x86_64-linux-gnu.tar.gz
    24f03c2a8786b1d0639f6cfcc8a09c046bbfaa7e64bfe83a4dbf57f2e7221c8694  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/SHA256SUMS.part
    2554db1a703e8ba93021657e4891214b310adb6311e6c8af02a99f9f6132f83922  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win-unsigned.tar.gz
    268103f60e038f9d618f2c9fafbdcc0955c4d632539ef3782315a889cc6db11872  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64-debug.zip
    278f26c2e33273ce7291c453b76365723852dd18fca80441f992664065879df5e1  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64-setup-unsigned.exe
    28bbe860791669f86bf3c6edcb7683e016f192d003bec15c9c141f7dfae3d11160  guix-build-38fd709fa5b7/output/x86_64-w64-mingw32/bitcoin-38fd709fa5b7-win64.zip
    
  18. hebasto commented at 8:32 pm on October 11, 2021: member

    FWIW, the current master (1790a8ddacae0d52135f5020894ef1ceef625cf9) has 2 -Wmaybe-uninitialized warnings:

     0$ gcc --version
     1gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
     2Copyright (C) 2019 Free Software Foundation, Inc.
     3This is free software; see the source for copying conditions.  There is NO
     4warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     5
     6$ make > /dev/null 
     7test/fuzz/float.cpp: In function ‘void float_fuzz_target(FuzzBufferType)’:
     8test/fuzz/float.cpp:60:30: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     9   60 |         assert(std::isnan(d) || d == d_deserialized);
    10      |                              ^~
    11In file included from ./validation.h:15,
    12                 from ./test/util/chainstate.h:13,
    13                 from test/validation_chainstate_tests.cpp:11:
    14./chain.h: In member function ‘void validation_chainstate_tests::chainstate_update_tip::test_method()’:
    15./chain.h:422:27: warning: ‘background_cs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    16  422 |         return vChain.size() > 0 ? vChain[vChain.size() - 1] : nullptr;
    17      |                ~~~~~~~~~~~^~
    18test/validation_chainstate_tests.cpp:110:18: note: ‘background_cs’ was declared here
    19  110 |     CChainState* background_cs;
    20      |                  ^~~~~~~~~~~~~
    

    Suggesting to postpone merging of this PR until those warnings are addressed.

  19. katesalazar commented at 8:37 pm on October 11, 2021: contributor
    @hebasto note #23101 fixed by #23132 ready to merge.
  20. in configure.ac:428 in 38fd709fa5
    425-  dnl -Wsuggest-override is broken with GCC before 9.2
    426-  dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
    427-  AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]],
    428-                        [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
    429-  AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
    430-  AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"], [], [$CXXFLAG_WERROR])
    


    MarcoFalke commented at 7:01 am on October 12, 2021:
    I presume this is enabled by default to warrant a removal?

    fanquake commented at 7:06 am on October 12, 2021:
    In Clang it’s included in -Wmost which is part of -Wall.
  21. MarcoFalke commented at 7:03 am on October 12, 2021: member
    Concept ACK 38fd709fa5b7a01f149a65efdfe1a6b463477e4e
  22. fanquake commented at 3:32 am on October 13, 2021: member

    Suggesting to postpone merging of this PR until those warnings are addressed.

    I’m not seeing this in any of the CIs. If people are seeing these locally, because their GCC is throwing false positives, i.e #23101, I’d suggest they either stop using --enable-werror, and/or, should probably migrate to using a version of GCC that works properly.

  23. fanquake merged this on Oct 13, 2021
  24. fanquake closed this on Oct 13, 2021

  25. fanquake deleted the branch on Oct 13, 2021
  26. sidhujag referenced this in commit 810cccd6d7 on Oct 13, 2021
  27. sidhujag referenced this in commit fdc7d7b957 on Oct 13, 2021
  28. vasild commented at 12:31 pm on October 29, 2021: member

    ACK 38fd709fa5b7a01f149a65efdfe1a6b463477e4e

    I checked separately clang and gcc, all of the removed -Werror=foo are either:

    • Enabled explicitly in configure.ac via -Wfoo, or
    • Enabled implicitly by e.g. -Wall in that compiler, or
    • Not exist in that compiler

    Now I can remove a custom build environment I had:

    0export CPPFLAGS="${CPPFLAGS} -Werror"
    
  29. DrahtBot locked this on Oct 30, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me