Posted By: WretchedSid
Assertion macro - 10/04/10 14:38
Heyho, I made this small assertion macro for one of my projects:
Here is how I use it:
It compiles and runs great with the GCC (4.2) and LLVM (1.5, 1.6, 2.0) (same macro but printf() and abort() instead of error() und sys_exit()) but the Lite-C compiler refuses to accept the way I use it (A8.02)
Is there something that I miss or is this a bug?
Code:
#define LFAssert(condition, message) if(!(condition)){error(message); sys_exit(NULL);}
Here is how I use it:
Code:
LFAssert(foopointer, "Some error message");
It compiles and runs great with the GCC (4.2) and LLVM (1.5, 1.6, 2.0) (same macro but printf() and abort() instead of error() und sys_exit()) but the Lite-C compiler refuses to accept the way I use it (A8.02)
Is there something that I miss or is this a bug?