[PATCH] D133711: [Sema] Reject array element types whose alignments are larger than their sizes

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 16:10:13 PDT 2022


efriedma added a comment.

Messing with the layout is risky.  If we give an error, the user will notice something is wrong, and can adapt their code (e.g. explicitly enforcing alignment using alignas).  If we silently use a different layout, and the class is used across compilers, the user ends up with a miscompile that's hard to diagnose.


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