From c1719013cf972ac1af92e6e23c1d3017d047a43a Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 17 Sep 1993 18:08:22 -0400 Subject: (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 --- gcc/c-typeck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') 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) -- cgit v1.1