From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12763 invoked by alias); 24 Apr 2004 05:30:06 -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 12748 invoked by uid 48); 24 Apr 2004 05:30:05 -0000 Date: Sat, 24 Apr 2004 08:26:00 -0000 Message-ID: <20040424053005.12747.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040123120418.13830.mattyt-bugzilla@tpg.com.au> References: <20040123120418.13830.mattyt-bugzilla@tpg.com.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13830] Invalid covariant type for identical type, friend related X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg02232.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-04-24 05:30 ------- Of course it has to do with friend classes. In the original code, in the friend declaration we look up X, don't find anything, and inject this name in the global namespace. When we later come back in the derived class, we see the friend declaration again, but this time we seem to know that the base class also has a member class X and think that the friend declaration corresponded to this. If you add a global class X to the snippet, then the name injection doesn't have to happen, and we seem to always believe that the friend declaration corresponds to the global class X. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13830