[llvm] [libc++] Ensure that `std::expected` has no tail padding (PR #69673)

Jan Kokemüller via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 21 04:42:13 PDT 2023


================
@@ -51,6 +51,7 @@ struct __libcpp_datasizeof {
   // the use as an extension.
   _LIBCPP_DIAGNOSTIC_PUSH
   _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-offsetof")
+  _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Winvalid-offsetof")
----------------
jiixyj wrote:

I noticed from earlier when playing around with `__libcpp_datasizeof` that GCC errors out on the `offsetof` (the CI build failed). It seems that with those diagnostic macros you need to suppress for both Clang and GCC separately because their flags may be different.

Anyway, this should probably a separate issue/PR, so I'll remove it for now.

https://github.com/llvm/llvm-project/pull/69673


More information about the llvm-commits mailing list