+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.
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.
--- /dev/null
+// 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)
+{
+}