[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 00:46:25 PST 2026
Meinersbur wrote:
>From the discussion in #173955 it seems that the motivation is that the warning is a false positive and the workaround adding an initializer would unnecessarily write zeros into the array while unconditionally overwritten.
Since Clang defines `__GNUC__` as well and supports `#pragma GCC diagnostic`, this disables all unitialized warnings in Clang and GCC. That's a pretty blunt instrument.
The premise is false anyway. GCC is able to optimize-away the zero-initialization away: https://godbolt.org/z/Gh6eGMbY3
https://github.com/llvm/llvm-project/pull/174918
More information about the llvm-commits
mailing list