zig/src/link/cbe.h

25 lines
461 B
C
Raw Normal View History

2020-11-19 01:50:51 +00:00
#if __STDC_VERSION__ >= 199901L
// C99 or newer
#include <stdbool.h>
#else
#define bool unsigned char
#define true 1
#define false 0
#endif
#if __STDC_VERSION__ >= 201112L
#define zig_noreturn _Noreturn
#elif __GNUC__
#define zig_noreturn __attribute__ ((noreturn))
#elif _MSC_VER
#define zig_noreturn __declspec(noreturn)
#else
#define zig_noreturn
#endif
2020-08-09 23:52:32 +01:00
#if __GNUC__
#define zig_unreachable() __builtin_unreachable()
#else
#define zig_unreachable()
#endif