build: enable `-Wunreachable-code-aggressive` #36623

pull fanquake wants to merge 4 commits into bitcoin:master from fanquake:unreachable_aggressive changing 6 files +11 −7
  1. fanquake commented at 2:12 PM on October 23, 2026: member

    Swap -Wunreachable-code for -Wunreachable-code-aggressive which also enables -Wunreachable-code-return and -Wunreachable-code-break.

    Based on:

  2. [nomerge] leveldb changes d641412836
  3. [nomerge] minisketch changes 25f2200215
  4. refactor: fix -Wunreachable-code-aggressive warnings 0acc4d0eb6
  5. build: swap -Wunreachable-code for aggressive variant
    Enables `-Wunreachable-code-break` and `-Wunreachable-code-return`.
    8f8ea0b2af
  6. DrahtBot added the label Build system on Oct 23, 2026
  7. DrahtBot commented at 2:12 PM on October 23, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  8. in src/script/interpreter.cpp:685 in 8f8ea0b2af
     677 | @@ -678,7 +678,14 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
     678 |                  {
     679 |                      return set_error(serror, SCRIPT_ERR_OP_RETURN);
     680 |                  }
     681 | +#if defined(__clang__)
     682 | +#pragma clang diagnostic push
     683 | +#pragma clang diagnostic ignored "-Wunreachable-code-break"
     684 | +#endif
     685 |                  break;
    


    willcl-ark commented at 2:57 PM on October 23, 2026:

    It does appear that this is likely removable too.

  9. DrahtBot added the label CI failed on Oct 23, 2026
  10. DrahtBot commented at 3:20 PM on October 23, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/39967612158/job/120461497226</sub> <sub>LLM reason (✨ experimental): CI failed the subtree lint check because the LevelDB and minisketch subtrees were modified without a subtree merge.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>


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: 2026-10-25 01:51 UTC

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