From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16024 invoked by alias); 27 Mar 2003 19:58:21 -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 15977 invoked from network); 27 Mar 2003 19:58:21 -0000 Message-ID: <3E8357DB.20304@eCosCentric.com> Date: Thu, 27 Mar 2003 19:58:00 -0000 From: Jonathan Larmour User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.3) Gecko/20030314 X-Accept-Language: en-gb, en, en-us MIME-Version: 1.0 To: Bart Veer Cc: ecos-maintainers@sources.redhat.com Subject: Re: [APPROVE] __cxa_pure_virtual() References: <20030327175605.5459FEC6F1@delenn.bartv.net> <3E833DDE.3090709@eCosCentric.com> <20030327185719.72D95EC6F1@delenn.bartv.net> In-Reply-To: <20030327185719.72D95EC6F1@delenn.bartv.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00077.txt.bz2 Bart Veer wrote: >>>>>>"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. Fair point. > 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. Well, in the future we should have a general way to deal with program termination/abort whatever. abort() has too many existing semantic requirements, but to achieve that sort of effect, particularly when a ROM monitor is present and you want to return to it, or whatever other (configurable) behaviour. But for much later (beyond 2.1 probably in practice). Jifl -- eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts --[ "You can complain because roses have thorns, or you ]-- --[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine