diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-07 14:30:38 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-07 14:30:38 +0000 |
| commit | 3c9b85aa8f5bccac8161ee7145c6bd8f95a5b846 (patch) | |
| tree | ac6c98ece2a2f9cbadb5d4bb91c10cb2588be17a | |
| parent | 481e2176f6a0802cd8b59023aa3c255be8a881cc (diff) | |
| download | ppe42-gcc-3c9b85aa8f5bccac8161ee7145c6bd8f95a5b846.tar.gz ppe42-gcc-3c9b85aa8f5bccac8161ee7145c6bd8f95a5b846.zip | |
2012-03-07 Richard Guenther <rguenther@suse.de>
* c-typeck.c (pointer_diff): Use c_common_type_for_size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185047 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/c-typeck.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a059a381f1..38c1cf9c761 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 61bb8fd016a..9891348029c 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; |

