[clang] [clang] Implement gcc_struct attribute on Itanium targets (PR #71148)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 13 14:58:12 PST 2025
================
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu %s
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu -fms-layout-compatibility=microsoft %s
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu %s
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu -fms-layout-compatibility=itanium %s
+
+struct {
+ int a : 24;
+ char b : 8;
+} __attribute__((gcc_struct)) t1;
+static int a1[(sizeof(t1) == 4) - 1];
----------------
efriedma-quic wrote:
static_assert
https://github.com/llvm/llvm-project/pull/71148
More information about the cfe-commits
mailing list