From: Richard Guenther Date: Wed, 7 Mar 2012 14:30:38 +0000 (+0000) Subject: c-typeck.c (pointer_diff): Use c_common_type_for_size. X-Git-Tag: misc/gccgo-go1_1_2~4154 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=647d4b7512f3ecb46466e433adf975d01b810054;p=thirdparty%2Fgcc.git c-typeck.c (pointer_diff): Use c_common_type_for_size. 2012-03-07 Richard Guenther * c-typeck.c (pointer_diff): Use c_common_type_for_size. From-SVN: r185047 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a059a381f1f..38c1cf9c7614 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-07 Richard Guenther + + * c-typeck.c (pointer_diff): Use c_common_type_for_size. + 2012-03-07 Richard Guenther * convert.c (strip_float_extensions): Move ... diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 61bb8fd016ad..9891348029c1 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3413,8 +3413,7 @@ pointer_diff (location_t loc, tree op0, tree op1) be the same as the result type (ptrdiff_t), but may need to be a wider type if pointers for the address space are wider than ptrdiff_t. */ if (TYPE_PRECISION (restype) < TYPE_PRECISION (TREE_TYPE (op0))) - inttype = lang_hooks.types.type_for_size - (TYPE_PRECISION (TREE_TYPE (op0)), 0); + inttype = c_common_type_for_size (TYPE_PRECISION (TREE_TYPE (op0)), 0); else inttype = restype;