[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 29 14:08:10 PST 2018


rsmith added inline comments.


================
Comment at: lib/Headers/__stddef_max_align_t.h:44
+#endif
 } max_align_t;
 #endif
----------------
I don't want to hold up the immediate fix in this patch for this, but... we should move the definition of this type from the header into clang itself, like we do for (say) `__builtin_va_list`, and here just define

`typedef __builtin_max_align_t max_align_t;`

That way Clang can synthesize a struct of whatever size and alignment appropriate from an ABI perspective (or can use the relevant builtin type for platforms that typedef `max_align_t` to a builtin type). That'd also remove the need for an awkward factored-out header file here.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55057





More information about the cfe-commits mailing list