diff options
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 2 | ||||
-rw-r--r-- | gcc/c-family/c-omp.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 38149c8c6dd..9ff311c90bb 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2011-07-19 Richard Guenther <rguenther@suse.de> + + * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. + * c-omp.c (c_finish_omp_for): Likewise. + 2011-07-12 Eric Botcazou <ebotcazou@adacore.com> * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 3ffacd5b444..ecb0c8463e7 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -3760,7 +3760,7 @@ pointer_int_sum (location_t loc, enum tree_code resultcode, if (resultcode == MINUS_EXPR) intop = fold_build1_loc (loc, NEGATE_EXPR, sizetype, intop); - ret = fold_build2_loc (loc, POINTER_PLUS_EXPR, result_type, ptrop, intop); + ret = fold_build_pointer_plus_loc (loc, ptrop, intop); fold_undefer_and_ignore_overflow_warnings (); diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c index d2256ffd376..340656fa14f 100644 --- a/gcc/c-family/c-omp.c +++ b/gcc/c-family/c-omp.c @@ -424,7 +424,7 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv, if (TREE_CODE (incr) == POSTDECREMENT_EXPR || TREE_CODE (incr) == PREDECREMENT_EXPR) t = fold_build1_loc (elocus, NEGATE_EXPR, sizetype, t); - t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (decl), decl, t); + t = fold_build_pointer_plus (decl, t); incr = build2 (MODIFY_EXPR, void_type_node, decl, t); } break; |