Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Next zsh release
- X-seq: zsh-workers 29329
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Wayne Davison <wayne@xxxxxxxxxxxxxxx>
- Subject: Re: Next zsh release
- Date: Thu, 19 May 2011 20:35:21 +0200
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Peter Stephenson <Peter.Stephenson@xxxxxxx>, "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=OEXAHDwXMW+a9wKCNtJI/QpDnGwHJPNAQDX324kOqyg=; b=V1r4ktTpeRJr22Bgrfjygd6/6kACtAh44qVpSmFnZ9DCqnIZYXVDAAQJtVLKL5ggi6 P8ElptEucXTRyE4dbzMuakCoFgD9b7eLS4fxK0jNz+33PnNQWqS3DSaIivSczBpEgkIQ 1zz81/12zrnnKCkwVfjJa+4hmBVy0H0pGkuHM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ux8toXLy0VWYEaundzjU3sjekQwvcVEirgpk02QvT2ek2yZt046BRICrLyHHNE2JGJ VJmolYbJ5zHVXiHKLJRBL56d3qoc39dGQzEEmVfzm+tDKbtLWS3NncfDqNjTIjl26Kr5 8sXlqb5Nuz7j15Z7IVu10pDmnXoDSa8Ysy1Fs=
- In-reply-to: <BANLkTikyyCFP0muGMZ5NzkThJrWDPqSsPA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20110519140215.2879aeeb@pwslap01u.europe.root.pri> <BANLkTimMFRvw6a6wxPxA656KJ+_oommMLA@mail.gmail.com> <BANLkTinen5KwzxSoPtVd9=TG9AATvZFYkw@mail.gmail.com> <BANLkTimYMvT66AxwxsEudskNO5zEzk=gSg@mail.gmail.com> <BANLkTikyyCFP0muGMZ5NzkThJrWDPqSsPA@mail.gmail.com>
On 19 May 2011 20:17, Wayne Davison <wayne@xxxxxxxxxxxxxxx> wrote:
> On Thu, May 19, 2011 at 10:53 AM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> Hm, in this line,
>> push(setmathvar(mvp,c), mvp->lval, 0);
>> isn't it undefined whether setmathvar runs first or mvp->lval is evaluated?
>
> Yeah, it is. That should probably be changed to this, just for safety's sake:
>
> c = setmathvar(mvp, c);
> push(c, mvp->lval, 0);
make check still passes with this change, other than that I'm not sure
exactly what math construct this code actually handles. It fails if I
comment out the push() though, so it's covered I
suppose.</superparanoidmode>
--- a/Src/math.c
+++ b/Src/math.c
@@ -1161,7 +1161,8 @@ op(int what)
}
if (tp & (OP_E2|OP_E2IO)) {
struct mathvalue *mvp = stack + sp + 1;
- push(setmathvar(mvp,c), mvp->lval, 0);
+ c = setmathvar(mvp, c);
+ push(c, mvp->lval, 0);
} else
push(c,NULL, 0);
return;
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author