Ruby
4.1.0dev (2026-03-23 revision f8459601271ebbc5e1efb101387da955ed1faabb)
prism
compiler
align.h
Go to the documentation of this file.
1
4
#ifndef PRISM_COMPILER_ALIGN_H
5
#define PRISM_COMPILER_ALIGN_H
6
10
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
/* C11 or later */
12
#define PRISM_ALIGNAS _Alignas
13
15
#define PRISM_ALIGNOF _Alignof
16
#elif defined(__GNUC__) || defined(__clang__)
18
#define PRISM_ALIGNAS(size) __attribute__((aligned(size)))
19
21
#define PRISM_ALIGNOF(type) __alignof__(type)
22
#elif defined(_MSC_VER)
24
#define PRISM_ALIGNAS(size) __declspec(align(size))
25
27
#define PRISM_ALIGNOF(type) __alignof(type)
28
#else
30
#define PRISM_ALIGNAS(size)
31
33
#define PRISM_ALIGNOF(type) sizeof(type)
34
#endif
35
36
#endif
Generated by
1.9.8