jfb marked an inline comment as done. jfb added inline comments.
================ Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:264 +def warn_union_tail_padding_uninitialized : Warning< + "Initializing union %0 field %1 only initializes the first %2 of %3 bytes, leaving the remaining %4 bytes undefined">, + InGroup<UnionTailPadding>; ---------------- Something which I'm not sure matters: ``` union Unnamed { union { int i; float f; }; char bytes[8]; }; union Unnamed unnamed = { 42 }; ``` Will generate the following diagnostic: ``` warning: Initializing union 'Unnamed' field '' only initializes the first 4 of 8 bytes, leaving the remaining 4 bytes undefined [-Wunion-tail-padding] union Unnamed unnamed = { 42 }; ^ ``` I think that's generally how we handle unnamed members anyways? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80055/new/ https://reviews.llvm.org/D80055 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits