From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29280 invoked by alias); 11 Feb 2002 19:36: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 29233 invoked by uid 71); 11 Feb 2002 19:36:01 -0000 Resent-Date: 11 Feb 2002 19:36:01 -0000 Resent-Message-ID: <20020211193601.29232.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, Theodore.Papadopoulo@sophia.inria.fr Received:(qmail 17546 invoked by uid 61); 11 Feb 2002 19:27:08 -0000 Message-Id:<20020211192707.17544.qmail@sources.redhat.com> Date: Mon, 11 Feb 2002 11:36:00 -0000 From: Theodore.Papadopoulo@sophia.inria.fr Reply-To: Theodore.Papadopoulo@sophia.inria.fr To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/5658: Regression on redefinition of a type in a derived class. X-SW-Source: 2002-02/txt/msg00260.txt.bz2 List-Id: >Number: 5658 >Category: c++ >Synopsis: Regression on redefinition of a type in a derived class. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Feb 11 11:36:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Theodore Papadopoulo >Release: unknown-1.0 >Organization: >Environment: i686-pc-linux-gnu Linux 2.2.18 >Description: This is a regression from 3.0 or gcc version 3.1 20011022. The following minimal example now fails to compile. This might be related to the correction of C++ bug 72. What is really strange is that if the constructor for B is removed, then everything is compiling again. vanuatu->g++ TemplateInheritance.C TemplateInheritance.C: In instantiation of `B::B() [with T = int]': TemplateInheritance.C:18: instantiated from here TemplateInheritance.C:14: declaration of `template struct B::iterator' TemplateInheritance.C:12: conflicts with previous declaration `template struct B::iterator' TemplateInheritance.C:14: declaration of `template struct B::iterator' TemplateInheritance.C:12: conflicts with previous declaration `template struct B::iterator' TemplateInheritance.C:14: declaration of `template struct B::iterator' TemplateInheritance.C:12: conflicts with previous declaration `template struct B::iterator' >How-To-Repeat: Just compile the program above with a recent compiler. >Fix: I did not find one, that is why I believe the problem is serious. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="TemplateInheritance.C" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="TemplateInheritance.C" Ly8gQnVpbGQgZG9uJ3QgbGluazoKCi8vIENvcHlyaWdodCAoQykgMjAwMiBGcmVlIFNvZnR3YXJl IEZvdW5kYXRpb24sIEluYy4KLy8gQ29udHJpYnV0ZWQgYnkgVGhlb2RvcmUuUGFwYWRvcG91bG8g MTEgRmViIDIwMDIgPFRoZW9kb3JlLlBhcGFkb3BvdWxvQHNvcGhpYS5pbnJpYS5mcj4KCnN0cnVj dCBBIHsKICAgIHR5cGVkZWYgaW50IGl0ZXJhdG9yOwp9Owp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4K c3RydWN0IEI6IHB1YmxpYyBBIHsKICAgIHRlbXBsYXRlIDx0eXBlbmFtZSBVPgogICAgc3RydWN0 IGl0ZXJhdG9yIHsKICAgIH07CiAgICBCKCkgeyB9Cn07CmludCBtYWluKCkgCnsKICAgIEI8aW50 PiBhOyAKfTsK