diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-14 19:23:27 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-14 19:23:27 -0400 |
commit | e8b87aac1c978cf9ee25c7fa228069eca4c271c9 (patch) | |
tree | 12bdd984f5558b74837b1e0f77c5bae8e94bf212 /gcc | |
parent | c3fac8665131c5b8736a4432889040d868da8174 (diff) | |
download | gcc-e8b87aac1c978cf9ee25c7fa228069eca4c271c9.zip gcc-e8b87aac1c978cf9ee25c7fa228069eca4c271c9.tar.gz gcc-e8b87aac1c978cf9ee25c7fa228069eca4c271c9.tar.bz2 |
(lookup_field): Change name comparison to match what field_decl_cmp
does.
From-SVN: r10138
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-typeck.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9e40abd..8c5f2cd 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; |