aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-03-07 14:30:38 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-03-07 14:30:38 +0000
commit647d4b7512f3ecb46466e433adf975d01b810054 (patch)
treeac6c98ece2a2f9cbadb5d4bb91c10cb2588be17a /gcc
parent73ddd02d12feb31ba6d99d02d8707cb51cd88ab1 (diff)
downloadgcc-647d4b7512f3ecb46466e433adf975d01b810054.zip
gcc-647d4b7512f3ecb46466e433adf975d01b810054.tar.gz
gcc-647d4b7512f3ecb46466e433adf975d01b810054.tar.bz2
c-typeck.c (pointer_diff): Use c_common_type_for_size.
2012-03-07 Richard Guenther <rguenther@suse.de> * c-typeck.c (pointer_diff): Use c_common_type_for_size. From-SVN: r185047
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-typeck.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2a059a3..38c1cf9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2012-03-07 Richard Guenther <rguenther@suse.de>
+ * c-typeck.c (pointer_diff): Use c_common_type_for_size.
+
+2012-03-07 Richard Guenther <rguenther@suse.de>
+
* convert.c (strip_float_extensions): Move ...
* tree.c (strip_float_extensions): ... here.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 61bb8fd..9891348 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;