solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
include
align.h
Go to the documentation of this file.
1
6
#if defined(_MSC_VER)
7
/* MSVC (Windows) */
8
#define ALIGN(x) __declspec(align(x))
9
#elif defined(__GNUC__) || defined(__clang__)
10
/* GCC / Clang (Linux, macOS, MinGW) */
11
#define ALIGN(x) __attribute__((aligned(x)))
12
#elif __STDC_VERSION__ >= 201112L
13
/* C11 Standard */
14
#define ALIGN(x) _Alignas(x)
15
#else
16
/* Fallback (No alignment - risky for SIMD) */
17
#define ALIGN(x)
18
#pragma message("Warning: alignment attribute not supported on this compiler.")
19
#endif
Generated by
1.9.8