Bug 28985 - [DR 399] class member access using a qualified-id fails to check for match of classes
Summary: [DR 399] class member access using a qualified-id fails to check for match of...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks: c++-core-issues P1787R6 29843
  Show dependency treegraph
 
Reported: 2006-09-08 18:01 UTC by Jorn Wolfgang Rennecke
Modified: 2021-12-04 11:40 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work: 2.95.3, 3.0.4, 3.2.3, 3.3.3
Known to fail: 3.4.0, 4.0.0, 4.0.4, 4.1.0, 4.2.0
Last reconfirmed: 2007-08-06 14:45:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2006-09-08 18:01:34 UTC
The following code violates clause 4 of 3.4.5

class C {};

void
f ()
{
  C o;

  class C {};

  o.C::~C ();
}
Comment 1 Andrew Pinski 2006-09-09 04:10:48 UTC
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.
Comment 2 Mark Mitchell 2006-09-10 22:09:27 UTC
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.
Comment 3 Gabriel Dos Reis 2007-02-03 19:44:38 UTC
won't fix in GCC-4.0.x.  Adjusting milestone.
Comment 4 Joseph S. Myers 2008-07-04 21:29:30 UTC
Closing 4.1 branch.
Comment 5 Jason Merrill 2008-12-03 21:52:27 UTC
This is open core issue 399:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#399

Suspending.
Comment 6 Jason Merrill 2008-12-04 14:53:47 UTC
Removing regression tag.
Comment 7 Joseph S. Myers 2009-03-31 19:42:35 UTC
Removing milestone since not currently tagged a regression.
Comment 8 Andrew Pinski 2021-07-24 00:29:50 UTC
[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]