The following invalid code snippet is not rejected: ==================== struct A {};
struct B { friend A::~B(); }; ==================== The problem appeared in gcc 4.0.0. -- Summary: [4.0/4.1/4.2 regression] Invalid destructor name accepted in friend declaration Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: accepts-invalid, monitored, patch Severity: normal Priority: P3 Component: c++ AssignedTo: reichelt at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25552