diff options
author | Mikhail Maltsev <maltsevm@gmail.com> | 2015-10-13 21:31:48 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2015-10-13 15:31:48 -0600 |
commit | 179b8d05e9b773510208660d57f7e78504e75a9d (patch) | |
tree | 7699f1d55a547fca431e8154b9a40dc1c868fc72 /libcpp/system.h | |
parent | 141aa58b53d979d2ffa38e072691ecf55a5a5b04 (diff) | |
download | gcc-179b8d05e9b773510208660d57f7e78504e75a9d.tar.gz |
[PATCH 1/9] ENABLE_CHECKING refactoring
[PATCH 1/9] ENABLE_CHECKING refactoring
gcc/ChangeLog:
2015-10-05 Mikhail Maltsev <maltsevm@gmail.com>
* common.opt: Add flag_checking.
* system.h (CHECKING_P): Define.
libcpp/ChangeLog:
2015-10-05 Mikhail Maltsev <maltsevm@gmail.com>
* system.h (CHECKING_P, gcc_checking_assert): Define.
From-SVN: r228787
Diffstat (limited to 'libcpp/system.h')
-rw-r--r-- | libcpp/system.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/system.h b/libcpp/system.h index a2e8c26b0b0..20f07bbe261 100644 --- a/libcpp/system.h +++ b/libcpp/system.h @@ -391,6 +391,15 @@ extern void abort (void); #define __builtin_expect(a, b) (a) #endif +#ifdef ENABLE_CHECKING +#define gcc_checking_assert(EXPR) gcc_assert (EXPR) +#define CHECKING_P 1 +#else +/* N.B.: in release build EXPR is not evaluated. */ +#define gcc_checking_assert(EXPR) ((void)(0 && (EXPR))) +#define CHECKING_P 1 +#endif + /* Provide a fake boolean type. We make no attempt to use the C99 _Bool, as it may not be available in the bootstrap compiler, and even if it is, it is liable to be buggy. |