Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5f4472e

Browse files
extern-fn-explicit-align test: add MSVC compatible alignment attribute
1 parent 84ff2e3 commit 5f4472e

File tree

1 file changed

+10
-1
lines changed
  • tests/run-make/extern-fn-explicit-align

1 file changed

+10
-1
lines changed

tests/run-make/extern-fn-explicit-align/test.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33
#include <stdint.h>
44
#include <string.h>
55

6+
#ifdef _MSC_VER
7+
__declspec(align(16))
68
struct TwoU64s
79
{
810
uint64_t a;
911
uint64_t b;
10-
} __attribute__((aligned(16)));
12+
};
13+
#else
14+
struct __attribute__((aligned(16))) TwoU64s
15+
{
16+
uint64_t a;
17+
uint64_t b;
18+
};
19+
#endif
1120

1221
struct BoolAndU32
1322
{

0 commit comments

Comments
 (0)