From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19381 invoked by alias); 18 Apr 2002 13:16:10 -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 19344 invoked by uid 71); 18 Apr 2002 13:16:02 -0000 Resent-Date: 18 Apr 2002 13:16:02 -0000 Resent-Message-ID: <20020418131602.19343.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, schrotie@uni-bielefeld.de Received:(qmail 18824 invoked by uid 61); 18 Apr 2002 13:13:46 -0000 Message-Id:<20020418131346.18823.qmail@sources.redhat.com> Date: Thu, 18 Apr 2002 06:16:00 -0000 From: schrotie@uni-bielefeld.de Reply-To: schrotie@uni-bielefeld.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6355: g++ 2.95.4 allows creation of pure virtual object by autoconversion X-SW-Source: 2002-04/txt/msg00925.txt.bz2 List-Id: >Number: 6355 >Category: c++ >Synopsis: g++ 2.95.4 allows creation of pure virtual object by autoconversion >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Thu Apr 18 06:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Thorsten Roggendorf >Release: 2.95.4 >Organization: >Environment: debian woody up to date as of 18.4.02 custom linux kernel 2.4.18 built with gcc 2.95.4 >Description: This code should be rejected, the bug can be pretty hard to find in complex code: class Base { public: Base(bool) {} virtual Base* clone() const = 0; }; class Composition { Base* basePointer_; public: Composition(const Base& basePointer) : basePointer_(basePointer.clone()) {} }; int main() { Composition c(false); } >How-To-Repeat: Compile the above code without any compiler options, execute a.out if you care. >Fix: Dunno. >Release-Note: >Audit-Trail: >Unformatted: