Commit aa1826e2 by Nathan Sidwell Committed by Nathan Sidwell

tree.c (cp_tree_equal): Adjust final switch formatting.

cp:
	* tree.c (cp_tree_equal): Adjust final switch formatting. Add
	't' case.
testsuite:
	* g++.old-deja/g++.pt/typename28.C: New test.

From-SVN: r41462
parent 06d9f09f
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (cp_tree_equal): Adjust final switch formatting. Add
't' case.
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
(layout_empty_base): Return at end flag.
(build_base_field): Likewise.
......
......@@ -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;
......
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/typename28.C: New test.
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.abi/empty2.C: New test.
* g++.old-deja/g++.abi/empty3.C: New test.
......
// Build don't link:
//
// Origin: Jens.Maurer@gmx.net
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 11 Apr 2001 <nathan@codesourcery.com>
// Bug 1844. We can meet types in cp_tree_equal via a template-id-expr.
typedef int *Ptr;
template<class T> struct B
{
typedef typename T::template X<T> type;
typedef typename T::template X<Ptr> type2;
typedef typename T::template X<int *> type3;
void foo (type);
void baz (type2);
};
template<class T> void B<T>::foo (type)
{
}
template<class T> void B<T>::baz (type3)
{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment