diff options
Diffstat (limited to 'gcc-4.6/gcc/c-typeck.c')
-rw-r--r-- | gcc-4.6/gcc/c-typeck.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc-4.6/gcc/c-typeck.c b/gcc-4.6/gcc/c-typeck.c index 0392b93..c86cfe9 100644 --- a/gcc-4.6/gcc/c-typeck.c +++ b/gcc-4.6/gcc/c-typeck.c @@ -3831,11 +3831,7 @@ build_unary_op (location_t location, if (val && TREE_CODE (val) == INDIRECT_REF && TREE_CONSTANT (TREE_OPERAND (val, 0))) { - tree op0 = fold_convert_loc (location, sizetype, - fold_offsetof (arg, val)), op1; - - op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0)); - ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0); + ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg)); goto return_build_unary_op; } @@ -9124,7 +9120,11 @@ c_process_expr_stmt (location_t loc, tree expr) exprv = expr; while (TREE_CODE (exprv) == COMPOUND_EXPR) exprv = TREE_OPERAND (exprv, 1); - if (DECL_P (exprv) || handled_component_p (exprv)) + while (CONVERT_EXPR_P (exprv)) + exprv = TREE_OPERAND (exprv, 0); + if (DECL_P (exprv) + || handled_component_p (exprv) + || TREE_CODE (exprv) == ADDR_EXPR) mark_exp_read (exprv); /* If the expression is not of a type to which we cannot assign a line |