Commit 2a2b1d56 by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

* pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.

From-SVN: r46772
parent 5f850402
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> 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (copy_lang_type): Add static prototype. * lex.c (copy_lang_type): Add static prototype.
......
...@@ -7174,6 +7174,7 @@ tsubst_copy (t, args, complain, in_decl) ...@@ -7174,6 +7174,7 @@ tsubst_copy (t, args, complain, in_decl)
case ARRAY_TYPE: case ARRAY_TYPE:
case TYPENAME_TYPE: case TYPENAME_TYPE:
case UNBOUND_CLASS_TEMPLATE: case UNBOUND_CLASS_TEMPLATE:
case TYPEOF_TYPE:
case TYPE_DECL: case TYPE_DECL:
return tsubst (t, args, complain, in_decl); return tsubst (t, args, complain, in_decl);
......
// 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);
}
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