From e8b87aac1c978cf9ee25c7fa228069eca4c271c9 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 14 Jul 1995 19:23:27 -0400 Subject: [PATCH] (lookup_field): Change name comparison to match what field_decl_cmp does. From-SVN: r10138 --- gcc/c-typeck.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9e40abdc1df..8c5f2cd7cfb 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1138,8 +1138,6 @@ lookup_field (type, component, indirect) top = TYPE_LANG_SPECIFIC (type)->len; while (top - bot > 1) { - HOST_WIDE_INT cmp; - half = (top - bot + 1) >> 1; field = field_array[bot+half]; @@ -1167,10 +1165,9 @@ lookup_field (type, component, indirect) continue; } - cmp = (HOST_WIDE_INT) DECL_NAME (field) - (HOST_WIDE_INT) component; - if (cmp == 0) + if (DECL_NAME (field) == component) break; - if (cmp < 0) + if (DECL_NAME (field) < component) bot += half; else top = bot + half; -- 2.30.2