public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: schrotie@uni-bielefeld.de To: gcc-gnats@gcc.gnu.org Subject: c++/6355: g++ 2.95.4 allows creation of pure virtual object by autoconversion Date: Thu, 18 Apr 2002 06:16:00 -0000 [thread overview] Message-ID: <20020418131346.18823.qmail@sources.redhat.com> (raw) >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:
next reply other threads:[~2002-04-18 13:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-18 6:16 schrotie [this message] 2002-09-15 5:17 nathan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020418131346.18823.qmail@sources.redhat.com \ --to=schrotie@uni-bielefeld.de \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).