Aria

A low-level systems programming language
git clone git://git.m21c.me/Aria.git
Log | Files | Refs | LICENSE

commit 1330e3e1855e91a1f755f10c628860b8706595fe
parent d4b065fb260a57895304cec9b9e5b7eb3e6423a5
Author: m21c <ho*******@gmail.com>
Date:   Fri, 27 Jun 2025 18:31:56 +0200

redefine assert for easier debugging

Diffstat:
Mcompiler.c | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/compiler.c b/compiler.c @@ -7,6 +7,20 @@ #include <stdbool.h> #include <string.h> +/* @note redeinition of assert() for ease of debugging. */ +#ifdef assert +#undef assert +#endif +static void +myassert(const char *expr, const char *file, int line) +{ + _assert(expr, file, line); +} + +#define assert(_Expression) (void) ( \ + (!!(_Expression)) || (myassert(#_Expression,__FILE__,__LINE__),0) \ +) + // @section forward declarations {{{ typedef unsigned char uchar;