This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7876: g++ doesn't diagnose One Reference Rule violation
- From: gdr at nerim dot net
- To: gcc-gnats at gcc dot gnu dot org
- Date: 10 Sep 2002 07:56:57 -0000
- Subject: c++/7876: g++ doesn't diagnose One Reference Rule violation
- Reply-to: gdr at nerim dot net
>Number: 7876
>Category: c++
>Synopsis: g++ doesn't diagnose One Reference Rule violation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Tue Sep 10 01:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gabriel Dos Reis <gdr@nerim.net>
>Release: unknown-1.0
>Organization:
>Environment:
Plateform independent
>Description:
The program below is ill-formed but g++ fails to diagnose
it: The name 'X' refers to different declarations in its
context and when re-evaluated in the completed scope of A.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="name-lookup2.C"
Content-Disposition: inline; filename="name-lookup2.C"
template<typename>
struct X { };
struct B { };
struct A {
typedef X<int> X;
};