public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16514] New: no warning of non-virtual dtor in subclass
@ 2004-07-13 10:20 naiman at math dot jct dot ac dot il
  2004-07-13 10:28 ` [Bug c++/16514] " falk at debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: naiman at math dot jct dot ac dot il @ 2004-07-13 10:20 UTC (permalink / raw)
  To: gcc-bugs

Dear G++ Folk,

An astute student found the following example:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
class foo1 {
public:
    virtual void f1 (void) {}
    virtual ~foo1 (void);
};

class foo2 : public foo1 {
public:
    ~foo2 (void);
};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We believe the compiler should at least warn that foo2
has a virtual function, and non-virtual dtor.

Thank you for your time!

ATB,

Aaron Naiman

--
Aaron ("Aharon") Naiman | Jerusalem College of Technology--Machon Lev
  naiman@math.jct.ac.il | http://math.jct.ac.il/~naiman

-- 
           Summary: no warning of non-virtual dtor in subclass
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: naiman at math dot jct dot ac dot il
                CC: gcc-bugs at gcc dot gnu dot org,naiman at math dot jct
                    dot ac dot il


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16514


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

end of thread, other threads:[~2004-07-13 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-13 10:20 [Bug c++/16514] New: no warning of non-virtual dtor in subclass naiman at math dot jct dot ac dot il
2004-07-13 10:28 ` [Bug c++/16514] " falk at debian dot org
2004-07-13 11:53 ` gdr at acm dot org
2004-07-13 11:53 ` [Bug c++/16514] New: " Gabriel Dos Reis

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