Commit 40e41c17 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[libc] allow customizing filename given to __FC_assert in assert.h

useful to obtain reproducible oracles even with fully normalized input files
parent d2f574d3
......@@ -42,5 +42,12 @@ __POP_FC_STDLIB
#ifdef NDEBUG
#define assert(ignore) ((void)0)
#else
#define assert(e) (__FC_assert((e) != 0,__FILE__,__LINE__,#e))
#ifndef __FC_ASSERT_FILE__
#define __FC_FILENAME__ __FILE__
#else
#define str(a) # a
#define xstr(a) str(a)
#define __FC_FILENAME__ xstr(__FC_ASSERT_FILE__)
#endif
#define assert(e) (__FC_assert((e) != 0,__FC_FILENAME__,__LINE__,#e))
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment