OSDN Git Service

(lookup_field): Change name comparison to match what field_decl_cmp
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jul 1995 23:23:27 +0000 (23:23 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jul 1995 23:23:27 +0000 (23:23 +0000)
does.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10138 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 9e40abd..8c5f2cd 100644 (file)
@@ -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;