[PATCH] D133711: [Sema] Reject array element types whose alignments are larger than their sizes
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 13:13:00 PDT 2022
ahatanak added a comment.
It looks like gcc started rejecting the code relatively recently (11.1).
Also, I found out that MSVC doesn't reject the following code:
struct T0 { char c; };
struct T2 : virtual T0 { };
T2 array[2];
The size of `T2` is 5 and its alignment is 4. The size of `array` is 10 bytes.
https://godbolt.org/z/c1EzdYqPc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133711/new/
https://reviews.llvm.org/D133711
More information about the cfe-commits
mailing list