diff options
| author | 2025-12-11 12:28:32 +0100 | |
|---|---|---|
| committer | 2025-12-11 12:28:32 +0100 | |
| commit | f6e34f84e14ac5f272cb31e28e2f023acf702a99 (patch) | |
| tree | 6a00e53fd4a35a558bfd0cb50329b7fdbf3d3145 | |
| parent | 744705931dd6522a69a4d41e1bc5af9e87262255 (diff) | |
fatal() make noreturn
| -rw-r--r-- | common.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -16,7 +16,13 @@ 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 +#define NORETURN _Noreturn +#else +#define NORETURN +#endif #ifdef __has_builtin #define HAS_BUILTIN(b) __has_builtin(__builtin_##b) @@ -389,7 +395,7 @@ void markfileonce(int id, const char *guard); void markfileseen(int id); bool isfileseen(int id); void closefile(int id); -_Noreturn void fatal(const struct span *, const char *, ...); +NORETURN void fatal(const struct span *, const char *, ...); void error(const struct span *, const char *, ...); void warn(const struct span *, const char *, ...); void note(const struct span *, const char *, ...); |