Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* The first occurrence of EXPR is not evaluated due to the sizeof,
- but will trigger any pedantic warnings masked by the __extension__
- for the second occurrence. The ternary operator is required to
- support function pointers and bit fields in this context, and to
- suppress the evaluation of variable length arrays. */
- # define assert(expr)
- ((void) sizeof ((expr) ? 1 : 0), __extension__ ({
- if (expr)
- ; /* empty */
- else
- __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION);
- }))
- # define assert(expr)
- ({
- if (expr)
- ; /* empty */
- else
- __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement