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