We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c56f19 commit 165ec47Copy full SHA for 165ec47
regression/ansi-c/Union_Padding1/main.c
@@ -62,6 +62,33 @@ STATIC_ASSERT(sizeof(union some_union4)==3);
62
63
#endif
64
65
+#ifdef _MSC_VER
66
+
67
+union some_union5
68
+{
69
+ int i;
70
+};
71
72
+STATIC_ASSERT(__alignof(union some_union5)==1);
73
74
+#else
75
76
77
78
79
80
81
+union some_union6
82
83
84
+} __attribute__((__packed__));
85
86
+// Packing may affect alignment
87
+STATIC_ASSERT(_Alignof(union some_union5)==4);
88
+STATIC_ASSERT(_Alignof(union some_union6)==1);
89
90
+#endif
91
92
int main()
93
{
94
}
0 commit comments