================
@@ -0,0 +1,94 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only
-Wweakened-alignment -verify=itanium -DITANIUM %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fsyntax-only
-Wweakened-alignment -verify=msvc -DMSVC %s
+
+// msvc-no-diagnostics
+
+#pragma pack(2)
+struct D1 {
+ char m1;
+ alignas(8) int m4; // itanium-warning {{explicit alignment of m4 (8 bytes)
was weakened to 2 bytes}}
----------------
AaronBallman wrote:
Agreed; we'd usually issue a note for this because it's pretty easy to miss all
the ways alignment can be initially set (attributes, keywords, pragmas).
https://github.com/llvm/llvm-project/pull/198417
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits