Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions include/prism/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,11 @@
* specify alignment in a compiler-agnostic way.
*/
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 or later */
#include <stdalign.h>

/** Specify alignment for a type or variable. */
#define PRISM_ALIGNAS(size) alignas(size)
#define PRISM_ALIGNAS _Alignas

/** Get the alignment requirement of a type. */
#define PRISM_ALIGNOF(type) alignof(type)
#define PRISM_ALIGNOF _Alignof
#elif defined(__GNUC__) || defined(__clang__)
/** Specify alignment for a type or variable. */
#define PRISM_ALIGNAS(size) __attribute__((aligned(size)))
Expand Down