public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/1969: private delete fails mysteriously
@ 2001-04-01 0:00 bh
0 siblings, 0 replies; only message in thread
From: bh @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 1969
>Category: c++
>Synopsis: private delete fails mysteriously
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 13 16:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Benoit Hudson
>Release: gcc version 2.97 20010212 (experimental)
>Organization:
>Environment:
>Description:
I found this on gcc-2.95.2 but it's still present on the
CodeSourcery version.
>How-To-Repeat:
cat > foo.cc << EOF
class A {
private:
void operator delete(void*);
public:
virtual ~A() { }
};
class B : public A {
public:
virtual ~B() { }
};
EOF
gcc -c foo.cc
>Fix:
Make delete be accessible to B (protected, for instance).
Never destroy a B.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="foo.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.cc"
Y2xhc3MgQSB7CiAgICBwcml2YXRlOgogICAgICAgIHZvaWQgb3BlcmF0b3IgZGVsZXRlKHZvaWQq
KTsKICAgIHB1YmxpYzoKICAgICAgICB2aXJ0dWFsIH5BKCkgeyB9Cn07CgpjbGFzcyBCIDogcHVi
bGljIEEgewogICAgcHVibGljOgogICAgICAgIHZpcnR1YWwgfkIoKSB7IH0KfTsK
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-01 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 0:00 c++/1969: private delete fails mysteriously bh
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).