Changeset 78b3f52 for src/libcfa/assert
- Timestamp:
- Dec 2, 2016, 5:10:22 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- d7bcbf5
- Parents:
- 4cb935e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/assert
r4cb935e r78b3f52 20 20 #include <assert.h> 21 21 22 #define __STRINGIFY__(str) #str 23 #define __VSTRINGIFY__(str) __STRINGIFY__(str) 24 #define assertf(expr, fmt, ...) ((expr) ? ((void)2) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ )) 22 #ifdef NDEBUG 23 #define assertf(expr, fmt, ...) ((void)0) 24 #else 25 #define __STRINGIFY__(str) #str 26 #define __VSTRINGIFY__(str) __STRINGIFY__(str) 27 #define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ )) 25 28 26 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn)); 29 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn)); 30 #endif 27 31 } 28 32
Note: See TracChangeset
for help on using the changeset viewer.