Changeset 46f1d20 for src/examples/gc_no_raii/src/tools/checks.h
- Timestamp:
- Sep 9, 2016, 11:50:04 AM (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:
- ddcfb88
- Parents:
- 850fda6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/gc_no_raii/src/tools/checks.h
r850fda6 r46f1d20 1 1 #pragma once 2 2 3 #if _DEBUG 3 #ifdef NDEBUG 4 5 #define check(x) 6 7 #define checkf(x, format, ...) 8 9 #warning no debug checks 10 11 #else 4 12 5 13 #include <stdlib.h> … … 10 18 printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\ 11 19 abort();\ 12 }}while( 0)\20 }}while( (int)0 )\ 13 21 14 22 #define checkf(x, ...) do {\ … … 17 25 printf(__VA_ARGS__);\ 18 26 abort();\ 19 }}while(0)\ 20 21 #else 22 23 #define check(x) 24 25 #define checkf(x, format, ...) 27 }}while( (int)0 )\ 26 28 27 29 #endif //NO_CHECKS
Note: See TracChangeset
for help on using the changeset viewer.