scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 4224b2666c38f74d0e02787005572d66a4ad3607
parent 4f8980c62a63c938a957a469bae8fa9ed88e399f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu,  4 Aug 2016 16:14:17 +0200

[libc] Fix definition of assert

__assert() needs the value of the expression or it will not
be able to determine is the assert was correct or not :P

Diffstat:
Mlibc/include/amd64-sysv/assert.h | 2+-
Mlibc/include/i386-sysv/assert.h | 2+-
Mlibc/include/qbe/assert.h | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libc/include/amd64-sysv/assert.h b/libc/include/amd64-sysv/assert.h @@ -3,7 +3,7 @@ #define _ASSERT_H #ifndef NDEBUG -#define assert(exp) __assert(#exp, __FILE__, __LINE__) +#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) #endif #endif diff --git a/libc/include/i386-sysv/assert.h b/libc/include/i386-sysv/assert.h @@ -3,7 +3,7 @@ #define _ASSERT_H #ifndef NDEBUG -#define assert(exp) __assert(#exp, __FILE__, __LINE__) +#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) #endif #endif diff --git a/libc/include/qbe/assert.h b/libc/include/qbe/assert.h @@ -3,7 +3,7 @@ #define _ASSERT_H #ifndef NDEBUG -#define assert(exp) __assert(#exp, __FILE__, __LINE__) +#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) #endif #endif