+2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
+
2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (copy_lang_type): Add static prototype.
case ARRAY_TYPE:
case TYPENAME_TYPE:
case UNBOUND_CLASS_TEMPLATE:
+ case TYPEOF_TYPE:
case TYPE_DECL:
return tsubst (t, args, complain, in_decl);
--- /dev/null
+// Test typeof template argument substitution
+
+// Copyright (C) 2001 Free Software Foundation
+// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+// { dg-do compile }
+// { dg-options "" }
+
+template <class T> struct A {
+ void f() {}
+ void g(T* t) {
+ A<typeof(t)> a;
+ a.f();
+ }
+};
+
+int main()
+{
+ A<int> a;
+ int b;
+ a.g(&b);
+}