build: Disable noisy `-Wreturn-type` for MinGW-w64 #26190

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220928-return changing 1 files +6 −6
  1. hebasto commented at 8:08 AM on September 28, 2022: member

    On the master (9fcdb9f3a044330d3d7515fa35709102c98534d2) we have -Wno-error=return-type for MinGW-w64, to allow us successfully cross-compile Windows release binaries which also being configured with --enable-werror.

    Although, even during daily cross-compiling (which is usual for me) such warnings are noisy, distracting and useless, as all of them are false-positive. Disabling them for MinGW-w64 looks safe now because code quality is checked by other compilers, including MSVC. Also, after moving to std::filesystem, we have much less Windows-specific code paths.

  2. DrahtBot added the label Build system on Sep 28, 2022
  3. DrahtBot commented at 9:35 AM on September 28, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25972 (build: no-longer disable WARN_CXXFLAGS when CXXFLAGS is set by fanquake)

    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.

  4. hebasto marked this as a draft on Sep 28, 2022
  5. fanquake commented at 9:58 AM on September 28, 2022: member

    ~0. I think this should just be removed entirely, and if someone wants to suppress it (regardless of if they are building with -Werror), they can add -Wno-return-type to their CXXFLAGS.

    In any case, you can't make the change (in it's current form) until after 25972. Otherwise the CXXFLAGS being dropped will cause the CI to fail. (another reason to just add it to CXXFLAGS when required, including in the CI).

  6. hebasto force-pushed on Sep 28, 2022
  7. build: Disable noisy `-Wreturn-type` for MinGW-w64 80aeed5046
  8. hebasto force-pushed on Sep 28, 2022
  9. hebasto commented at 10:10 AM on September 28, 2022: member

    In any case, you can't make the change (in it's current form) until after 25972. Otherwise the CXXFLAGS being dropped will cause the CI to fail. (another reason to just add it to CXXFLAGS when required, including in the CI).

    Another option is to -Wno-return-type in depends/hosts/mingw32.mk?

    if someone wants to suppress it (regardless of if they are building with -Werror), they can add -Wno-return-type to their CXXFLAGS.

    For regular builds it is a good option. But for working on the build system itself it looks suboptimal...

  10. fanquake commented at 10:12 AM on September 28, 2022: member

    Another option is to -Wno-return-type in depends/hosts/mingw32.mk?

    NACK.

    For regular builds it is a good option. But for working on the build system itself it looks suboptimal...

    Why?

  11. hebasto commented at 10:16 AM on September 28, 2022: member

    For regular builds it is a good option. But for working on the build system itself it looks suboptimal...

    Why?

    To distinguish effect of compiler flags provided in different ways, it is useful to have a clean build with no user-provided flags (mostly related to my work on CMake-based system).

  12. hebasto closed this on Sep 28, 2022

  13. hebasto commented at 12:54 PM on November 15, 2022: member

    I think this should just be removed entirely

    Done in #26504.

  14. fanquake referenced this in commit e438a10287 on Jul 17, 2023
  15. bitcoin locked this on Nov 15, 2023

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-04-24 21:13 UTC

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