summaryrefslogtreecommitdiff
path: root/gcc/c-iterate.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-06-27 22:41:45 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-06-27 22:41:45 +0000
commitc9181584355619a537e6255c53ee168eaf873042 (patch)
tree38246b17025a9cbed643cb9d972a1a98ce90562e /gcc/c-iterate.c
parentcd5f95459961111b1924e49f6273ff69f2a08e79 (diff)
downloadgcc-c9181584355619a537e6255c53ee168eaf873042.tar.gz
(collect_iterators, case SAVE_EXPR): Simplify code added in previous
change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4768 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-iterate.c')
-rw-r--r--gcc/c-iterate.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/c-iterate.c b/gcc/c-iterate.c
index 09df3e46633..38c15a237f9 100644
--- a/gcc/c-iterate.c
+++ b/gcc/c-iterate.c
@@ -1,5 +1,5 @@
/* Build expressions with type checking for C compiler.
- Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -209,12 +209,9 @@ collect_iterators (exp, list)
case SAVE_EXPR:
/* In each scan, scan a given save_expr only once. */
- {
- tree tail;
- for (tail = save_exprs; tail; tail = TREE_CHAIN (tail))
- if (TREE_VALUE (tail) == exp)
- return list;
- }
+ if (value_member (exp, save_exprs))
+ return list;
+
save_exprs = tree_cons (NULL_TREE, exp, save_exprs);
return collect_iterators (TREE_OPERAND (exp, 0), list);