* call.c (check_dtor_name): Handle template names correctly.
From-SVN: r39809
This commit is contained in:
parent
3747f3dc72
commit
8084b91ec4
@ -1,3 +1,7 @@
|
||||
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);
|
||||
|
||||
|
10
gcc/testsuite/g++.old-deja/g++.other/dtor13.C
Normal file
10
gcc/testsuite/g++.old-deja/g++.other/dtor13.C
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.
|
||||
}
|
Loading…
Reference in New Issue
Block a user