[llvm] [flang-rt][build] Disable two build-time warning of '-Wuninitialized' from g++ compiler (PR #174918)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 03:03:58 PST 2026


Meinersbur wrote:

I mean this: https://godbolt.org/z/7Y3zTn8Wb

> example: flang-rt/include/flang-rt/runtime/terminator.h

https://github.com/llvm/llvm-project/blob/80ae94c63d681a029d211d0670f672441b4c3077/flang-rt/include/flang-rt/runtime/terminator.h#L40-L50

This has a separate case for clang (`#if defined(__clang__)` which in this case is not strictly needed). It is also not a false positive and a comment describes why it is there instead of the workaround which this PR misses.

However, since GCC is able to optimize-away the zero-initialization, I am strongly in favor of that workaround.

https://github.com/llvm/llvm-project/pull/174918


More information about the llvm-commits mailing list