http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
Jonathan Wakely redi at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
--- Comment #26 from Jonathan Wakely redi at gcc dot gnu.org 2011-06-02
21:29:53 UTC ---
(can this bug be un-ASSIGNED?)
(In reply to comment #25)
Here, H must have a virtual destructor. The point where it can know it should
warn is the delete
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
Manuel López-Ibáñez manu at gcc dot gnu.org changed:
What|Removed |Added
AssignedTo|mueller at gcc dot gnu.org |redi at gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
--- Comment #28 from Manuel López-Ibáñez manu at gcc dot gnu.org 2011-06-02
21:46:13 UTC ---
(In reply to comment #26)
I've posted a patch to http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00191.html
which gives this for the code in comment 25
--- Comment #25 from cesarb at cesarb dot net 2007-08-21 10:54 ---
The testcase seems to be missing one case where it should warn:
class H
{
protected:
~H();
public:
virtual void deleteme() = 0;
};
H::~H()
{
}
void
H::deleteme()
{
delete this;
}
class I :
--- Comment #24 from jason at gcc dot gnu dot org 2007-08-20 15:08 ---
Subject: Bug 7302
Author: jason
Date: Mon Aug 20 15:08:24 2007
New Revision: 127649
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=127649
Log:
PR c++/7302
* cp/class.c (finish_struct_1): Warn
--- Comment #21 from pluto at agmk dot net 2007-03-20 18:52 ---
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01343.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching
--- Comment #22 from manu at gcc dot gnu dot org 2007-03-20 19:01 ---
(In reply to comment #21)
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01343.html
Hint, if you use the patch queue[1], it takes care of adding a comment pointing
to the patch. Also, your patch lacks a Changelog
--- Comment #23 from patchapp at dberlin dot org 2007-03-20 19:42 ---
Subject: Bug number PR7302
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01347.html
--
--- Comment #17 from pluto at agmk dot net 2007-03-16 15:22 ---
Created an attachment (id=13214)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13214action=view)
extended patch against gcc-4.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
--- You are receiving this
--- Comment #18 from manu at gcc dot gnu dot org 2007-03-16 15:30 ---
(In reply to comment #17)
Created an attachment (id=13214)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13214action=view) [edit]
extended patch against gcc-4.2
Hi Pawel,
if the bug exists in mainline, the
--- Comment #19 from pluto at agmk dot net 2007-03-16 15:39 ---
(In reply to comment #18)
The patch needs testcases,
i have a testcase but my tcl/autogen/dejagnu crashes
with magic `spawn failed' message :/
e.g.:
(...)
Executing on host:
--- Comment #20 from manu at gcc dot gnu dot org 2007-03-16 16:13 ---
(In reply to comment #19)
(In reply to comment #18)
The patch needs testcases,
i have a testcase but my tcl/autogen/dejagnu crashes
with magic `spawn failed' message :/
No idea. Ask in the gcc list,
--- Comment #14 from pluto at agmk dot net 2007-02-22 00:13 ---
(In reply to comment #12)
Already posted as http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00885.html,
with no response.
this patch doesn't cover one situation:
struct D;
struct C {
virtual void f() = 0;
--- Comment #15 from ben at decadent dot org dot uk 2007-02-22 01:10
---
Pawel: Yes, any friend class or function can call a protected or private
destructor wrongly. So can members of the class - in fact, even pure virtual
members can, since they may still have definitions!
The
--- Comment #16 from pluto at agmk dot net 2007-02-22 02:02 ---
quite better ( modulo coding style ) patch is:
--- class.c.orig2006-10-12 22:02:53.0 +0200
+++ class.c 2007-02-22 02:54:11.888652367 +0100
@@ -5105,15 +5105,15 @@
tree dtor;
dtor =
--- Comment #11 from manu at gcc dot gnu dot org 2007-02-13 15:12 ---
(In reply to comment #8)
Created an attachment (id=11520)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11520action=view) [edit]
proposed patch (with doc and test changes)
Thanks for the patch. However,
--- Comment #12 from ben at decadent dot org dot uk 2007-02-13 16:16
---
Already posted as http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00885.html,
with no response.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
--- You are receiving this mail because: ---
You are
--- Comment #9 from dee at pcds dot biz 2006-12-07 21:25 ---
I'd like to point out that structures containing only pure virtual functions
should not trigger this diagnostic either. Consider the following:
struct IfacFoo
{
virtual int a() = 0;
virtual int b() = 0;
};
There is no
--- Comment #10 from ben at decadent dot org dot uk 2006-12-08 00:40
---
Lawrence: Every class has a destructor. You're talking about classes that have
trivial destructors. Whether a non-virtual destructor is trivial or not has no
bearing on the fact that if an instance of a derived
--
fang at csl dot cornell dot edu changed:
What|Removed |Added
CC||fang at csl dot cornell dot
|
--- Comment #8 from ben at decadentplace dot org dot uk 2006-05-27 15:30
---
Created an attachment (id=11520)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11520action=view)
proposed patch (with doc and test changes)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
Submitter-Id: net
Originator:Cesar Eduardo Barros
Organization:
Confidential: no
Synopsis: -Wnon-virtual-dtor should't complain of protected dtor
Severity: non-critical
Priority: low
Category: c++
Class: sw-bug
Release: 3.1.1 20020703 (Debian prerelease
23 matches
Mail list logo