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


ahatanak added a comment.

I was looking at another example. The following code is accepted by 10.3, but is rejected by 11.1 because the size isn't a multiple of the alignment.

  struct __attribute__((packed)) S {
    char c;
    int i;
  };
  
  typedef S AlignedS __attribute__((aligned(4)));
  AlignedS array[4];

https://godbolt.org/z/hcoznss1d


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