mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:30:29 +08:00
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
This commit is contained in:
parent
73ddd02d12
commit
647d4b7512
@ -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 ...
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user