[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 14:11:00 PDT 2022


ahatanak added a comment.

In D133711#3787604 <https://reviews.llvm.org/D133711#3787604>, @ahatanak wrote:

> Unlike gcc or clang. MSVC doesn't round up the size to its alignment. I don't mean it should reject the code.

Sorry, my comment was misleading. clang has the same behavior as MSVC when the target is 32-bit (e.g., `i686-pc-win32`). The size and alignment of `T2` and `array` are the same. If the target isn't 32-bit MSVC, the size is correctly round up to the alignment.


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