From 31f6b60f650a72d7727d386cef160f4baae70f38 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 11 Dec 2025 17:57:07 +0100 Subject: _Alignof and stuff --- common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index ce7d604..2b2bfd7 100644 --- a/common.h +++ b/common.h @@ -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)) -- cgit v1.2.3