public inbox for ecos-maintainers@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jifl@eCosCentric.com>
To: Bart Veer <bartv@ecoscentric.com>
Cc: ecos-maintainers@sources.redhat.com
Subject: Re: [APPROVE] __cxa_pure_virtual()
Date: Thu, 27 Mar 2003 19:58:00 -0000	[thread overview]
Message-ID: <3E8357DB.20304@eCosCentric.com> (raw)
In-Reply-To: <20030327185719.72D95EC6F1@delenn.bartv.net>

Bart Veer wrote:
>>>>>>"Jifl" == Jonathan Larmour <jifl@eCosCentric.com> 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

      reply	other threads:[~2003-03-27 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-27 17:56 Bart Veer
2003-03-27 18:07 ` Jonathan Larmour
2003-03-27 18:32   ` John Dallaway
2003-03-27 18:57   ` Bart Veer
2003-03-27 19:58     ` Jonathan Larmour [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E8357DB.20304@eCosCentric.com \
    --to=jifl@ecoscentric.com \
    --cc=bartv@ecoscentric.com \
    --cc=ecos-maintainers@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).