This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7876: g++ doesn't diagnose One Reference Rule violation


>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;
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]