[PATCH] D80055: Diagnose union tail padding
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 15 19:01:10 PDT 2020
dexonsmith added inline comments.
================
Comment at: clang/test/CodeGen/union-tail-padding.c:28-36
+union Front {
+ int i;
+ long long ll;
+};
+
+union Front front1;
+union Front front2 = {}; // expected-warning {{Initializing union 'Front' field 'i' only initializes the first 4 of 8 bytes, leaving the remaining 4 bytes undefined}}
----------------
Are these warnings actionable? What should users do when they see this warning?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80055/new/
https://reviews.llvm.org/D80055
More information about the cfe-commits
mailing list