From owner-freebsd-hackers Sun Mar 16 17:25:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA09008 for hackers-outgoing; Sun, 16 Mar 1997 17:25:05 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA08955 for ; Sun, 16 Mar 1997 17:24:57 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by who.cdrom.com (8.8.5/8.6.11) with SMTP id QAA23799 for ; Sun, 16 Mar 1997 16:16:05 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA06832; Sun, 16 Mar 1997 17:06:18 -0700 From: Terry Lambert Message-Id: <199703170006.RAA06832@phaeton.artisoft.com> Subject: Re: Barb problem, FOUND To: imp@village.org (Warner Losh) Date: Sun, 16 Mar 1997 17:06:17 -0700 (MST) Cc: terry@lambert.org, hackers@FreeBSD.org In-Reply-To: <199703170008.RAA03992@rover.village.org> from "Warner Losh" at Mar 16, 97 05:08:58 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > : OK, then I don't know why it's bitching. It's perfectly valid to have > : a virtual destructor inline: the STL library book does it, so it's an > : OK thing to do. > > It is a valid C++ construct, but it is not always handled well by C++ > compilers. That's why it is bitching. Generally, virtual inlines are > a bad idea for the reasons that I've already gone into. Those reasons are only valid for bad compiler/object-format/linker combinations. Too bad FreeBSD has one of these. 8-|. The "correct" FreeBSD "workaround" (as long as we are stuck at a.out) is to duplicate the code statically, per module using the virtual base class. > : Personally, I think it's a compiler bug. > > It is. Quanitifying it is the hard part. The compiler should "do the right thing". The "right thing" in the FreeBSD case is "emit the code and don't bitch about it being a potentially duplicated code block because of the scoping forced on it by FreeBSD's use of the antiquated a.out object format". Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.