]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-typeck.c (pointer_diff): Use c_common_type_for_size.
authorRichard Guenther <rguenther@suse.de>
Wed, 7 Mar 2012 14:30:38 +0000 (14:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 7 Mar 2012 14:30:38 +0000 (14:30 +0000)
2012-03-07  Richard Guenther  <rguenther@suse.de>

* c-typeck.c (pointer_diff): Use c_common_type_for_size.

From-SVN: r185047

gcc/ChangeLog
gcc/c-typeck.c

index 2a059a381f1f3d653cba4c26d4a5836ed2e4194f..38c1cf9c7614d7749627973a6bb9b9b6aab784e8 100644 (file)
@@ -1,3 +1,7 @@
+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 ...
index 61bb8fd016ad121ac956ccdf421b9a12a09cb998..9891348029c1b07b1114491a8f9a043b44fe995d 100644 (file)
@@ -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;