[llvm] [Flang-rt][build] fixes building warnings under gcc: (PR #173955)
Eugene Epshteyn via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 29 22:42:55 PST 2025
================
@@ -67,7 +67,7 @@ struct MaxOrMinIdentity<TypeCategory::Real, 16, IS_MAXVAL,
// Create a buffer to store binary representation of __float128 constant.
constexpr std::size_t alignment =
std::max(alignof(Type), alignof(std::uint64_t));
- alignas(alignment) char data[sizeof(Type)];
+ alignas(alignment) char data[sizeof(Type)]{};
----------------
eugeneepshteyn wrote:
I don't think this is necessary, because `data` is completely assigned to below. Adding default initialization would just initialize `data` to all zeros and then immediately overwrite it below.
https://github.com/llvm/llvm-project/pull/173955
More information about the llvm-commits
mailing list