From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23194 invoked by alias); 18 Jul 2002 08:46:03 -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 23174 invoked by uid 71); 18 Jul 2002 08:46:02 -0000 Resent-Date: 18 Jul 2002 08:46:02 -0000 Resent-Message-ID: <20020718084602.23173.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, wolfgang.bangerth@iwr.uni-heidelberg.de Received: (qmail 22231 invoked by uid 61); 18 Jul 2002 08:38:15 -0000 Message-Id: <20020718083815.22230.qmail@sources.redhat.com> Date: Thu, 18 Jul 2002 01:46:00 -0000 From: wolfgang.bangerth@iwr.uni-heidelberg.de Reply-To: wolfgang.bangerth@iwr.uni-heidelberg.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7348: More recent access control problems, and wrong implicit typename warnings X-SW-Source: 2002-07/txt/msg00545.txt.bz2 List-Id: >Number: 7348 >Category: c++ >Synopsis: More recent access control problems, and wrong implicit typename warnings >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Jul 18 01:46:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: gcc 3.2 pre 2002-07-17 >Description: The following fails to compile: --------------------------------------------- class Outer { template struct Inner { typedef int T; T foo (); }; public: Outer(); }; template typename Outer::Inner::T Outer::Inner::foo () { return 1; }; template Outer::Inner<2>; -------------------------------------------- The messages are: x.cc:2: error: `template struct Outer::Inner' is private x.cc:11: error: within this context x.cc:11: warning: `Outer::Inner::T' is implicitly a typename x.cc:11: warning: implicit typename is deprecated, please see the documentation for details Since Outer::Inner::T is the only way to access the return type of the function, this must be allowed. Furthermore, the implicit typename warning is bogus, since there a "typename" on this very line. This, just as c++/7347 is a new failure. Again, the bug goes away if the inner class is not a template, which is suspicious at best :-) Regards Wolfgang >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: