diff options
author | miyuki <miyuki@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-04 14:32:42 +0000 |
---|---|---|
committer | miyuki <miyuki@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-04 14:32:42 +0000 |
commit | 5e8689fb08c2687bad1165612b8568d1f8f6d69b (patch) | |
tree | 14a6eb201692f7e1d251cb78d7407f4f1ea97584 /gcc/cp/tree.c | |
parent | 06e9790ef7b1c8ec728c3e7a9189b8ddb14e3bfc (diff) | |
download | gcc-5e8689fb08c2687bad1165612b8568d1f8f6d69b.tar.gz |
ENABLE_CHECKING refactoring: C family front ends
gcc/c-family/
* c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
flag_checking.
gcc/cp/
* call.c (validate_conversion_obstack): Define unconditionally.
* constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
gcc_checking_assert.
* cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
* decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
* mangle.c (add_substitution): Likewise.
* method.c (maybe_explain_implicit_delete): Likewise.
* parser.c (cp_parser_template_argument_list): Remove conditional
compilation.
* pt.c (check_unstripped_args): Rename to...
(verify_unstripped_args): ... this and remove conditional compilation.
(retrieve_specialization): Guard call of verify_unstripped_args with
flag_checking.
(template_parm_to_arg): Remove conditional compilation.
(template_parms_to_args, coerce_template_parameter_pack,
coerce_template_parms): Likewise.
(tsubst_copy): Use flag_checking.
(type_unification_real): Remove conditional compilation.
(build_non_dependent_expr): Use flag_checking.
* tree.c (build_target_expr): Remove conditional compilation, use
gcc_checking_assert.
* typeck.c (comptypes): Likewise.
* typeck2.c (digest_init_r): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 11bd1299bd6..4311212770f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -321,15 +321,13 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain) tree t; tree type = TREE_TYPE (decl); -#ifdef ENABLE_CHECKING - gcc_assert (VOID_TYPE_P (TREE_TYPE (value)) - || TREE_TYPE (decl) == TREE_TYPE (value) - /* On ARM ctors return 'this'. */ - || (TYPE_PTR_P (TREE_TYPE (value)) - && TREE_CODE (value) == CALL_EXPR) - || useless_type_conversion_p (TREE_TYPE (decl), - TREE_TYPE (value))); -#endif + gcc_checking_assert (VOID_TYPE_P (TREE_TYPE (value)) + || TREE_TYPE (decl) == TREE_TYPE (value) + /* On ARM ctors return 'this'. */ + || (TYPE_PTR_P (TREE_TYPE (value)) + && TREE_CODE (value) == CALL_EXPR) + || useless_type_conversion_p (TREE_TYPE (decl), + TREE_TYPE (value))); t = cxx_maybe_build_cleanup (decl, complain); if (t == error_mark_node) |