#include <assert.h>
#include <derive-c/core/placeholder.h>
#include <derive-c/core/compiler.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
◆ DC_ASSERT
| #define DC_ASSERT |
( |
| expr, |
|
|
| ... ) |
◆ DC_ASSUME
| #define DC_ASSUME |
( |
| expr, |
|
|
| ... ) |
Value:
#define DC_ASSERT(expr,...)
Definition at line 57 of file panic.h.
◆ DC_DEBUG_ASSERT
◆ DC_LIKELY
Value:__builtin_expect(!!(x), 1)
Definition at line 48 of file panic.h.
◆ DC_PANIC
| #define DC_PANIC |
( |
| str, |
|
|
| ... ) |
Value: do { \
fprintf(stderr, "[%s:%d] " str, __FILE__, __LINE__ __VA_OPT__(, ) __VA_ARGS__); \
abort(); \
} while (0);
Definition at line 29 of file panic.h.
29 #define DC_PANIC(str, ...) \
30 do { \
31 fprintf(stderr, "[%s:%d] " str, __FILE__, __LINE__ __VA_OPT__(, ) __VA_ARGS__); \
32 abort(); \
33 } while (0);
◆ DC_STATIC_ASSERT
| #define DC_STATIC_ASSERT static_assert |
◆ DC_UNREACHABLE
| #define DC_UNREACHABLE |
( |
| ... | ) |
|
Value:DC_PANIC(
"unreachable: " __VA_ARGS__
"\n");
#define DC_PANIC(str,...)
Definition at line 44 of file panic.h.
◆ DC_WHEN
| #define DC_WHEN |
( |
| cond, |
|
|
| expr ) |
Value:
Definition at line 52 of file panic.h.