From: Tomas Bily Date: Mon, 12 May 2008 13:32:05 +0000 (+0200) Subject: typeck2.c (digest_init): Use CONVERT_EXPR_P. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63a906f02b620920f146512e2c5572b2ae5314f8;p=gcc.git typeck2.c (digest_init): Use CONVERT_EXPR_P. * typeck2.c (digest_init): Use CONVERT_EXPR_P. * call.c (build_over_call): Likewise. * error.c (dump_expr): Use CASE_CONVERT. * class.c (fixed_type_or_null): Likewise. From-SVN: r135213 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 73705037cd0..85deaa41fe2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2008-05-12 Tomas Bily + + * typeck2.c (digest_init): Use CONVERT_EXPR_P. + * call.c (build_over_call): Likewise. + * error.c (dump_expr): Use CASE_CONVERT. + * class.c (fixed_type_or_null): Likewise. + 2008-05-11 Volker Reichelt * parser.c (cp_parser_omp_clause_reduction): Add missing "expected" diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c072a7df77f..b83ad3a2eef 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5119,9 +5119,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) /* Pull out the real argument, disregarding const-correctness. */ targ = arg; - while (TREE_CODE (targ) == NOP_EXPR - || TREE_CODE (targ) == NON_LVALUE_EXPR - || TREE_CODE (targ) == CONVERT_EXPR) + while (CONVERT_EXPR_P (targ) + || TREE_CODE (targ) == NON_LVALUE_EXPR) targ = TREE_OPERAND (targ, 0); if (TREE_CODE (targ) == ADDR_EXPR) { diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 73f5dd5f717..4d786a288c1 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5411,8 +5411,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) return NULL_TREE; - case NOP_EXPR: - case CONVERT_EXPR: + CASE_CONVERT: return RECUR (TREE_OPERAND (instance, 0)); case ADDR_EXPR: diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 9216a44aad6..55e620a6b54 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1747,8 +1747,7 @@ dump_expr (tree t, int flags) dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS); break; - case NOP_EXPR: - case CONVERT_EXPR: + CASE_CONVERT: case VIEW_CONVERT_EXPR: { tree op = TREE_OPERAND (t, 0); diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index c7339f1832d..c1fea0c0bed 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -713,7 +713,7 @@ digest_init (tree type, tree init) /* Skip any conversions since we'll be outputting the underlying constant. */ - while (TREE_CODE (*exp) == NOP_EXPR || TREE_CODE (*exp) == CONVERT_EXPR + while (CONVERT_EXPR_P (*exp) || TREE_CODE (*exp) == NON_LVALUE_EXPR) exp = &TREE_OPERAND (*exp, 0);