From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22624 invoked by alias); 27 Mar 2003 18:57:20 -0000 Mailing-List: contact ecos-maintainers-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-maintainers-owner@sources.redhat.com Received: (qmail 22617 invoked from network); 27 Mar 2003 18:57:20 -0000 To: jifl@eCosCentric.com Cc: ecos-maintainers@sources.redhat.com In-reply-to: <3E833DDE.3090709@eCosCentric.com> (message from Jonathan Larmour on Thu, 27 Mar 2003 18:07:26 +0000) Subject: Re: [APPROVE] __cxa_pure_virtual() From: Bart Veer References: <20030327175605.5459FEC6F1@delenn.bartv.net> <3E833DDE.3090709@eCosCentric.com> Message-Id: <20030327185719.72D95EC6F1@delenn.bartv.net> Date: Thu, 27 Mar 2003 18:57:00 -0000 X-SW-Source: 2003-03/txt/msg00076.txt.bz2 >>>>> "Jifl" == Jonathan Larmour writes: Jifl> Bart Veer wrote: >> I have just committed a patch to CYGPKG_INFRA to provide an >> implementation of __cxa_pure_virtual() that is appropriate for eCos, >> overriding the one in libsupc++. >> >> http://sources.redhat.com/ml/ecos-patches/2003-03/msg00209.html Jifl> No objection in principle, although I think you could add a Jifl> diag_printf after the CYG_FAIL saying the same thing so Jifl> there is some potential diagnostic if people don't have Jifl> asserts enabled. Jifl> Perhaps even Jifl> #ifdef CYGDBG_USE_ASSERTS Jifl> CYG_FAIL Jifl> #else Jifl> diag_printf Jifl> #endif No. __cxa_pure_virtual() should never get called. Even when still debugging, there are very few applications sufficiently broken that __cxa_pure_virtual() would get called. In non-debug builds we want a minimal implementation, and having a diag_printf() in there would be a waste of code space. Arguably we should go even further and in non-debug builds alias this to cyg_assert_fail() or some other dummy function, saving a couple more bytes. Bart -- Bart Veer eCos Configuration Architect http://www.ecoscentric.com/ The eCos and RedBoot experts