From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24644 invoked by alias); 20 Dec 2002 20:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24602 invoked by uid 71); 20 Dec 2002 20:26:01 -0000 Resent-Date: 20 Dec 2002 20:26:01 -0000 Resent-Message-ID: <20021220202601.24601.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, bangerth@ticam.utexas.edu Received: (qmail 24371 invoked by uid 61); 20 Dec 2002 20:25:09 -0000 Message-Id: <20021220202509.24370.qmail@sources.redhat.com> Date: Fri, 20 Dec 2002 12:26:00 -0000 From: bangerth@ticam.utexas.edu Reply-To: bangerth@ticam.utexas.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9030: [3.4 regression] Template friends and access to local classes X-SW-Source: 2002-12/txt/msg01122.txt.bz2 List-Id: >Number: 9030 >Category: c++ >Synopsis: [3.4 regression] Template friends and access to local classes >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Dec 20 12:26:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: Today's CVS. >Description: The following used to compile (and does so with icc7, for example, in strict ANSI conformance mode): --------------------------- template class Outer { private: struct Inner {}; template friend typename Outer::Inner foo (); }; template typename Outer::Inner foo () { return Outer::Inner(); } void f() { foo(); } ----------------------------- It fails since yesterday: tmp/g> /home/bangerth/bin/gcc-3.4-CVS/bin/c++ -c x.cc x.cc: In function `void f()': x.cc:3: error: `struct Outer::Inner' is private x.cc:16: error: within this context x.cc:3: error: `struct Outer::Inner' is private x.cc:16: error: within this context x.cc:3: error: `struct Outer::Inner' is private x.cc:11: error: within this context x.cc: At global scope: x.cc: In instantiation of `typename Outer::Inner foo() [with T = int]': x.cc:16: instantiated from here x.cc:3: error: `struct Outer::Inner' is private x.cc:11: error: within this context x.cc:3: error: `struct Outer::Inner' is private x.cc:11: error: within this context Kriang, I think that one of your patches yesterday must have caused this, since our nightly builds went fine until this night. Could you take a look at it? Thanks Wolfgang >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: