diff options
| author | 2025-12-11 17:57:07 +0100 | |
|---|---|---|
| committer | 2025-12-11 17:57:07 +0100 | |
| commit | 31f6b60f650a72d7727d386cef160f4baae70f38 (patch) | |
| tree | 6618de25658d1de7be052b2b0a0cdc13c826ad78 /common.h | |
| parent | 79db8917a7d6722f0a64d4fa912efa5e96a1a2c3 (diff) | |
_Alignof and stuff
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -16,6 +16,7 @@ typedef unsigned short ushort; typedef unsigned long long uvlong; typedef signed long long vlong; typedef unsigned uint; + #if __STDC_VERSION__ >= 202311L #define NORETURN [[noreturn]] #elif __STDC_VERSION__ >= 201112L @@ -29,6 +30,7 @@ typedef unsigned uint; #else #define HAS_BUILTIN(_) 0 #endif + #define static_assert(x) _Static_assert(x, #x) #define in_range(x, Lo, Hi) ((uint) (x) - (Lo) <= (Hi) - (Lo)) /* lo <= x <= hi; lo > 0, hi > 0 */ #define alignup(x, A) (((x) + ((A) - 1)) & -(A)) |