In 5.2.4p2 [expr.pseudo]:
The cv-unqualified versions of
the object type and of the type designated by the pseudo-destructor-
name shall be the same type.
class B { };
class C : public B {
void m() {
this->~B();
}
};
I tried:
GNU C++ (GCC) version 4.4.0 20081003 (experimental) [trunk revision 140855]
(i686-apple-darwin9)
and it gave no error.
--
Summary: Pseudo destructor call
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrs at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38087