From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29366 invoked by alias); 7 May 2002 17:36: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 29327 invoked by uid 71); 7 May 2002 17:36:01 -0000 Resent-Date: 7 May 2002 17:36:01 -0000 Resent-Message-ID: <20020507173601.29326.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 26634 invoked by uid 61); 7 May 2002 17:33:04 -0000 Message-Id:<20020507173304.26633.qmail@sources.redhat.com> Date: Tue, 07 May 2002 10: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++/6596: Regression on C++ code. X-SW-Source: 2002-05/txt/msg00196.txt.bz2 List-Id: >Number: 6596 >Category: c++ >Synopsis: Regression on C++ code. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue May 07 10:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Theodore.Papadopoulo@sophia.inria.fr >Release: gcc version 3.2 20020424 (experimental) >Organization: >Environment: Gnu/Linux 2.2.18 Gnu libc-2.1.3.so >Description: The program below does not compile with gcc version 3.2 20020424 vanuatu->g++ toto.C toto.C: In copy constructor `A::H::H(const A::H&)': toto.C:13: `const' qualifiers cannot be applied to `A&' Remove the line with virtual and everything suddenly becomes fine. Something there is inconsistent. It worked with the 3.0 series and with 3.1 20011022 (experimental). In my opinion, the program should be valid, confirmed by my reading of the C++ standard (12.8.5). I do not have access to a current 3.1 version. >How-To-Repeat: Just compile the code in attachment. >Fix: Remove the pure virtual declaration. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="toto.C" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="toto.C" c3RydWN0IEEgewogICAgc3RydWN0IEggewogICAgICAgIEEmIGE7CiAgICAgICAgSChBJiBiKTog YShiKSB7IH0KICAgICAgICB2aXJ0dWFsIG9wZXJhdG9yIGludCgpIGNvbnN0ID0gMDsKICAgIH07 CgogICAgc3RydWN0IFI6IHB1YmxpYyBIIHsKICAgICAgICBSKEEmIGEpOkgoYSkgeyB9CiAgICAg ICAgb3BlcmF0b3IgaW50KCkgY29uc3QgeyByZXR1cm4gMTsgfQogICAgfTsKCiAgICBSIHIoKSB7 IHJldHVybiBSKCp0aGlzKTsgfQp9OwoKaW50Cm1haW4oKQp7CiAgICBBIGE7CiAgICBpbnQgaSA9 IGEucigpOwp9Cg==