octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: This doesn't look right


From: John W. Eaton
Subject: Re: This doesn't look right
Date: Mon, 25 Jan 2016 14:59:04 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 01/25/2016 01:00 PM, Carnë Draug wrote:
On 20 January 2016 at 00:40, Rik <address@hidden> wrote:
All,

Does anyone have thoughts on this routine in xpow.cc?

static void
gripe_failed_diagonalization (void)
{
   gripe_failed_diagonalization ();
}

It seems to call itself recursively with no exit.  This is a local gripe in
xpow.cc:58 and the function does not exist anywhere else in the OCtave code
base.


hg blame tells me it was added in 19d6f94c21cb [1] but there isn't any
details on the commit message.  Maybe it was some unfinished work?

Yeah, that is clearly a mistake. I don't know why I didn't put an error message in there.

The second oddity is in event-queue.h

class
event_queue_safe : public event_queue
{
private:

   static void gripe_exception (void);

This private function has a prototype, but no implementation anywhere.  If
this is really meant to be a do-nothing function then it should at least
have a comment to that effect.  Anyone know why this is the way it is?


hg blame tells me it was added in 1054ab58cd58 [2] but again, there isn't
many comments.  However, looking at the rest of the commit it seems to
be copied code from unwind_protect_safe (compare with [3]) so maybe it was
just a copy and paste mistake?

Yes, it looks like a copy and paste mistake. I'm pretty sure we don't want exceptions to be thrown when we are already inside a destructor, so I guess this should just be a warning, and we should change the one in unwind_protect_safe as well.

jwe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]