[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
This commit is contained in:
parent
141aa58b53
commit
179b8d05e9
@ -1,3 +1,8 @@
|
||||
2015-10-13 Mikhail Maltsev <maltsevm@gmail.com>
|
||||
|
||||
* common.opt: Add flag_checking.
|
||||
* system.h (CHECKING_P): Define.
|
||||
|
||||
2015-10-13 Jakub Jelinek <jakub@redhat.com>
|
||||
Aldy Hernandez <aldyh@redhat.com>
|
||||
Ilya Verbin <ilya.verbin@intel.com>
|
||||
|
@ -46,6 +46,11 @@ int optimize_fast
|
||||
Variable
|
||||
bool in_lto_p = false
|
||||
|
||||
; Enable additional checks of internal state consistency, which may slow
|
||||
; the compiler down.
|
||||
Variable
|
||||
bool flag_checking = CHECKING_P
|
||||
|
||||
; 0 means straightforward implementation of complex divide acceptable.
|
||||
; 1 means wide ranges of inputs must work for complex divide.
|
||||
; 2 means C99-like requirements for complex multiply and divide.
|
||||
|
@ -716,8 +716,11 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
|
||||
|
||||
#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
|
||||
|
||||
/* Use gcc_unreachable() to mark unreachable locations (like an
|
||||
|
@ -1,3 +1,7 @@
|
||||
2015-10-13 Mikhail Maltsev <maltsevm@gmail.com>
|
||||
|
||||
* system.h (CHECKING_P, gcc_checking_assert): Define.
|
||||
|
||||
2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/66415
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user