The following code violates clause 4 of 3.4.5 class C {}; void f () { C o; class C {}; o.C::~C (); }
Confirmed, a regression from 3.3.3 which gave: t.cc: In function `void f()': t.cc:10: error: lookup of `C' in the scope of `class C' (`class C') does not match lookup in the current scope (`class f()::C') To me this looks related to PR 28513.
The rules in the standard regarding destructor lookup, what constitues the same name, etc., are not well-specified. The last time I investigated this, the EDG front end used rules which did not seem to match the standard, but, IIRC, John Spicer argued that was a bug in the standard. In any case, this case is certainly invalid, but it may also be dangerous to try to fix it.
won't fix in GCC-4.0.x. Adjusting milestone.
Closing 4.1 branch.
This is open core issue 399: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#399 Suspending.
Removing regression tag.
Removing milestone since not currently tagged a regression.
[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]