From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28657 invoked by alias); 30 Jan 2004 16:50:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28625 invoked by uid 48); 30 Jan 2004 16:50:09 -0000 Date: Fri, 30 Jan 2004 16:50:00 -0000 From: "giovannibajo at libero dot it" To: gcc-bugs@gcc.gnu.org Message-ID: <20040130165003.13935.giovannibajo@libero.it> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13935] New: [3.4/3.5 Regression] Template friend lookup bug X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg03888.txt.bz2 List-Id: Posted by MattT originally within PR13813, but it's not related to that bug so I moved it to a different PR. ---------------------------------------------- template < class TP1 > class MainClass { public: class A; friend class B; A a; template < class TP2 > class B {}; class A { template < class TP2 > friend class B; }; }; int main(int argc, char *argv[]) { MainClass var; } ---------------------------------------------- matt.cc: At global scope: matt.cc: In instantiation of `MainClass::A': matt.cc:9: instantiated from `MainClass' matt.cc:22: instantiated from here matt.cc:13: error: `template struct MainClass::B' redeclared as different kind of symbol matt.cc:13: error: previous declaration of `struct B' EDG is confused because it refuses the definition of variable "a" at parsing time (which is wrong, since its type is dependent - MainClass::A - even under DR224). It *looks* like the code should be accepted to me. -- Summary: [3.4/3.5 Regression] Template friend lookup bug Product: gcc Version: 3.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giovannibajo at libero dot it CC: gcc-bugs at gcc dot gnu dot org,mattyt-bugzilla at tpg dot com dot au http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935