This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16514] no warning of non-virtual dtor in subclass


------- Additional Comments From gdr at acm dot org  2004-07-13 11:53 -------
Subject: Re:  New: no warning of non-virtual dtor in subclass

naiman at math dot jct dot ac dot il:
> 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.

You're mistaken: foo2 has a virtual destructor.


The PR is invalid.



-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]