From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20377 invoked by alias); 30 Jan 2004 17:58:03 -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 20353 invoked by uid 48); 30 Jan 2004 17:58:02 -0000 Date: Fri, 30 Jan 2004 17:58:00 -0000 Message-ID: <20040130175802.20352.qmail@sources.redhat.com> From: "giovannibajo at libero dot it" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040130165003.13935.giovannibajo@libero.it> References: <20040130165003.13935.giovannibajo@libero.it> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg03897.txt.bz2 List-Id: ------- Additional Comments From giovannibajo at libero dot it 2004-01-30 17:58 ------- Well, when I say: friend class B; I'm saying that ::B is a friend of MainClass<> (and ::B is thus predeclared). Then, I'm defining MainClass<>::B<>, which is a totally unrelated type. I don't see how this could be illegal. I think the crucial point is about this: template < class TP2 > friend class B; Does this refer to ::B or to MainClass<>::B<>? How is the lookup performed, exactly? There are a couple of DR in TC1 about name lookup issues of friend templates, I'll give them a deeper look. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935