public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6355: g++ 2.95.4 allows creation of pure virtual object by autoconversion
@ 2002-04-18  6:16 schrotie
  0 siblings, 0 replies; 2+ messages in thread
From: schrotie @ 2002-04-18  6:16 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/6355: g++ 2.95.4 allows creation of pure virtual object by autoconversion
@ 2002-09-15  5:17 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-15  5:17 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, schrotie

Synopsis: g++ 2.95.4 allows creation of pure virtual object by autoconversion

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Sep 15 05:17:51 2002
State-Changed-Why:
    fixed in cvs

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6355


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-15 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-18  6:16 c++/6355: g++ 2.95.4 allows creation of pure virtual object by autoconversion schrotie
2002-09-15  5:17 nathan

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).