mirror of https://github.com/flysand7/ciabatta.git
add underscore to _DEBUG user macro
This commit is contained in:
parent
ee2b02a5c4
commit
09fbcb4be3
|
@ -14,16 +14,16 @@ The macro checks whether `expr` is true, and if not, prints the
|
|||
diagnostic information and then aborts execution in a way equivalent to calling
|
||||
abort() function (See SIGABRT).
|
||||
|
||||
If DEBUG macro is defined, assert does not print a diagnostic message, and
|
||||
If `_DEBUG` macro is defined, assert does not print a diagnostic message, and
|
||||
instead simply causes a debug break.
|
||||
|
||||
If NDEBUG macro is defined assert expands to an empty statement. If both NDEBUG
|
||||
and DEBUG are defined, then DEBUG macro is ignored.
|
||||
and `_DEBUG` are defined, then `_DEBUG` macro is ignored.
|
||||
|
||||
```c
|
||||
#if defined(NDEBUG)
|
||||
#define assert(expr) ((void)0)
|
||||
#elif defined(DEBUG)
|
||||
#elif defined(`_DEBUG`)
|
||||
#define assert(expr) /* debug break */
|
||||
#else
|
||||
#define assert(expr) /* print diagnostic, then abort */
|
||||
|
|
|
@ -14,7 +14,7 @@ void _assert(
|
|||
|
||||
#if defined(NDEBUG)
|
||||
#define assert(ignore) ((void)0)
|
||||
#elif defined(DEBUG)
|
||||
#elif defined(_DEBUG)
|
||||
#if __GNUC__
|
||||
#define assert(c) if (!(c)) __builtin_trap()
|
||||
#elif _MSC_VER
|
||||
|
|
Loading…
Reference in New Issue