[PATCH] D106900: [PowerPC][AIX] Packed zero-width bitfields do not affect alignment.

Sean Fertile via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 4 07:25:56 PDT 2021


sfertile marked 2 inline comments as done.
sfertile added inline comments.


================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1783
+    if (FieldPacked) {
+      FieldAlign = UnpackedFieldAlign = 1;
+    } else if (!MaxFieldAlignment.isZero()) {
----------------
stevewan wrote:
> `UnpackedFieldAlign` is used to check if the packed attribute is unnecessary (-Wpacked). here the attribute is making a difference, we probably shouldn't set `FieldAlign = UnpackedFieldAlign`?
Good catch, updated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106900/new/

https://reviews.llvm.org/D106900



More information about the cfe-commits mailing list