re PR c++/28988 (g++ does not check first type name in pseudo-destructor-name)

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * semantics.c (finish_pseudo_destructor_expr): Check the
        destrutor name by calling check_dtor_name.

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * g++.dg/expr/dtor4.C: New test.

From-SVN: r121262
This commit is contained in:
Andrew Pinski
2007-01-28 10:18:52 -08:00
committed by Andrew Pinski
parent 9c5a8333f4
commit 19107d9889
4 changed files with 28 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2007-01-28 Andrew Pinski <pinskia@gmail.com>
PR C++/28988
* semantics.c (finish_pseudo_destructor_expr): Check the
destrutor name by calling check_dtor_name.
2007-01-10 Mark Mitchell <mark@codesourcery.com>
PR c++/28999

View File

@@ -1931,6 +1931,13 @@ finish_pseudo_destructor_expr (tree object, tree scope, tree destructor)
error ("invalid qualifying scope in pseudo-destructor name");
return error_mark_node;
}
if (scope && TYPE_P (scope) && !check_dtor_name (scope, destructor))
{
error ("qualified type %qT does not match destructor name ~%qT",
scope, destructor);
return error_mark_node;
}
/* [expr.pseudo] says both:

View File

@@ -1,3 +1,8 @@
2007-01-28 Andrew Pinski <pinskia@gmail.com>
PR C++/28988
* g++.dg/expr/dtor4.C: New test.
2007-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30278

View File

@@ -0,0 +1,10 @@
typedef int C;
typedef double D;
void
f ()
{
C o;
o.D::~C (); // { dg-error "" }
}