Changeset 13f2461 in mainline for uspace/lib/c/include/assert.h
- Timestamp:
- 2011-05-21T15:45:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9d47440, e06e2716
- Parents:
- faeb7cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/assert.h
rfaeb7cc r13f2461 47 47 */ 48 48 49 #define STR(l) #l 50 #define STR2(l) STR(l) 51 49 52 #ifndef NDEBUG 50 53 … … 52 55 do { \ 53 56 if (!(expr)) \ 54 assert_abort(#expr, __FILE__, __LINE__); \ 55 } while (0) 56 57 #define assert_static(expr) \ 58 do { \ 59 if (!(expr)) \ 60 assert_static_abort("Assertion failed (" #expr \ 61 ") in file \"" __FILE__ "\".\n"); \ 57 assert_abort(#expr, __FILE__, STR2(__LINE__)); \ 62 58 } while (0) 63 59 … … 65 61 66 62 #define assert(expr) 67 #define assert_static(expr)68 63 69 64 #endif /* NDEBUG */ 70 65 71 extern void assert_abort(const char *, const char *, unsigned int)66 extern void assert_abort(const char *, const char *, const char *) 72 67 __attribute__((noreturn)); 73 extern void assert_static_abort(const char *);74 68 75 69
Note:
See TracChangeset
for help on using the changeset viewer.