diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-09-17 18:08:22 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-09-17 18:08:22 -0400 |
commit | c1719013cf972ac1af92e6e23c1d3017d047a43a (patch) | |
tree | 361170d29a8ed357467a383484a29332735655d5 | |
parent | 72db60c6d546a436896e5ef500c173ec426f0933 (diff) | |
download | gcc-c1719013cf972ac1af92e6e23c1d3017d047a43a.zip gcc-c1719013cf972ac1af92e6e23c1d3017d047a43a.tar.gz gcc-c1719013cf972ac1af92e6e23c1d3017d047a43a.tar.bz2 |
(lookup_field): Use HOST_WIDE_INT instead of long or int when we want
integer wide enough to hold a pointer difference.
From-SVN: r5345
-rw-r--r-- | gcc/c-typeck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 07e2443..9e463cd 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1056,7 +1056,7 @@ lookup_field (type, component) top = TYPE_LANG_SPECIFIC (type)->len; while (top - bot > 1) { - int cmp; + HOST_WIDE_INT cmp; half = (top - bot + 1) >> 1; field = field_array[bot+half]; @@ -1081,7 +1081,7 @@ lookup_field (type, component) continue; } - cmp = (long)DECL_NAME (field) - (long)component; + cmp = (HOST_WIDE_INT) DECL_NAME (field) - (HOST_WIDE_INT) component; if (cmp == 0) break; if (cmp < 0) |