From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j4QG9GsR021834 for ; Thu, 26 May 2005 16:09:17 GMT Received: by zproxy.gmail.com with SMTP id 18so885207nzp for ; Thu, 26 May 2005 09:09:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CdONLGIIriMmv3eWzx+rBtb+hTI+8C3PwiQ7tdGwgiIq3k0ps3cs39CzZM/XyeZ6vzz04eWuONj3fTJrhKOP4kdQ2dnI+u4ObYK0XwQa//J7TRQtYDipJGFw9g8JsuzHiZc+TZcuMSeXPwBOPJuytd3NRqZYr+Lin0u3+C0WVsY= Received: by 10.36.135.13 with SMTP id i13mr103961nzd; Thu, 26 May 2005 09:09:21 -0700 (PDT) Received: by 10.36.103.4 with HTTP; Thu, 26 May 2005 09:09:19 -0700 (PDT) Message-ID: <3212b1a80505260909506ed4e1@mail.gmail.com> Date: Thu, 26 May 2005 18:09:19 +0200 From: Andreas Fredriksson To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: Re: KDE 3.4 visibility support disabled In-Reply-To: <200505260726.24954.caleb@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <200505251748.27667.cryos@gentoo.org> <200505260725.29929.danarmak@gentoo.org> <200505260726.24954.caleb@gentoo.org> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j4QG9GsR021834 X-Archives-Salt: d364af7f-1d04-4666-9336-7cf2bc3643cd X-Archives-Hash: 4b2a67b7bc62da6f25d41128c6c26813 On 5/26/05, Caleb Tennis wrote: > On Thursday 26 May 2005 02:30 am, Duncan wrote: > > So the KDE problem... Is that what's causing all those virtual function > > but destructor isn't virtual type warnings whenever I compile a KDE ebuild > > with gcc4? > > No, that's just shoddy C++ coding that also needs to be fixed. Sorry to cut in like this, but I get tired of comments like this. While this specific case might very well represent "shoddy" coding, there are perfectly good reasons to have non-virtual destructors in classes designed to be base classes. One common case is when COM-style reference counting is used. In such a scenario leaf classes always implement a release() member function which deletes 'this' when the reference count goes to zero. With this configuration there is no need for a virtual destructor since destructor chaining always happens from a leaf class. I hope one day GCC's warning for this will be smart enough to at least not complain about non-public non-virtual destructors in classes that otherwise contain virtual member functions. Then the warning will be useful and perhaps indicate "shoddy C++ coding". :-) // Andreas -- gentoo-dev@gentoo.org mailing list