summaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-20 16:06:06 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-20 16:06:06 +0000
commitb5a621907a2912d1c447fc1f635a2b50554c97d3 (patch)
tree75cb508620c3c8f8c3a2093c2de7c74b85375ce5 /gcc/cp/tree.c
parentf0cac90ff0e9c8f4e44f460d5d6b791888ea27fc (diff)
downloadgcc-b5a621907a2912d1c447fc1f635a2b50554c97d3.tar.gz
cp:
* tree.c (cp_tree_equal): Adjust final switch formatting. Add 't' case. testsuite: * g++.old-deja/g++.pt/typename28.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 09aa0cde2e3..43c493ecc2b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2008,21 +2008,27 @@ cp_tree_equal (t1, t2)
switch (TREE_CODE_CLASS (code1))
{
- int i;
case '1':
case '2':
case '<':
case 'e':
case 'r':
case 's':
- cmp = 1;
- for (i = 0; i < TREE_CODE_LENGTH (code1); ++i)
- {
- cmp = cp_tree_equal (TREE_OPERAND (t1, i), TREE_OPERAND (t2, i));
- if (cmp <= 0)
- return cmp;
- }
- return cmp;
+ {
+ int i;
+
+ cmp = 1;
+ for (i = 0; i < TREE_CODE_LENGTH (code1); ++i)
+ {
+ cmp = cp_tree_equal (TREE_OPERAND (t1, i), TREE_OPERAND (t2, i));
+ if (cmp <= 0)
+ return cmp;
+ }
+ return cmp;
+ }
+
+ case 't':
+ return same_type_p (t1, t2) ? 1 : 0;
}
return -1;