Commit 8084b91e by Mark Mitchell Committed by Mark Mitchell

* call.c (check_dtor_name): Handle template names correctly.

From-SVN: r39809
parent 3747f3dc
2001-02-17 Mark Mitchell <mark@codesourcery.com>
* call.c (check_dtor_name): Handle template names correctly.
2001-02-16 Jason Merrill <jason@redhat.com>
* cp-tree.h (DECL_USE_VTT_PARM): Remove.
......
......@@ -192,6 +192,15 @@ check_dtor_name (basetype, name)
else
name = get_type_value (name);
}
/* In the case of:
template <class T> struct S { ~S(); };
int i;
i.~S();
NAME will be a class template. */
else if (DECL_CLASS_TEMPLATE_P (name))
return 0;
else
my_friendly_abort (980605);
......
// Build don't link:
// Origin: Mark Mitchell <mark@codesourcery.com>
template <class T> struct S { ~S(); };
int i;
void f ()
{
i.~S(); // ERROR - invalid destructor call.
}
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