From: Geoff Wing <gcw@pobox.com>
To: zsh-workers@sunsite.auc.dk
Subject: Bad optimisations: (Was: Test version zsh-3.1.6-test-1)
Date: Fri, 16 Jul 1999 02:20:52 +1000 [thread overview]
Message-ID: <19990716022052.A29693@primenet.com.au> (raw)
In-Reply-To: <199907131130.NAA30286@beta.informatik.hu-berlin.de>
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote in zsh-users:
:Under DU 4.0 with gcc-2.8.1 I get a SEGV in a piece of completely
:correct C-code in bin_read(). I can work around this by using the
:patch below -- which, of course, is completely silly.
:Dunno if this should be included, but the SEGV is deadly: it fails on
:e.g. the read in compinit.
- if (*args && **args == '?')
- args++;
- /* default result parameter */
- reply = *args ? *args++ : ops['A'] ? "reply" : "REPLY";
+ if (*args && **args == '?') {
+ args++;
+ /* default result parameter */
+ reply = *args ? *args++ : ops['A'] ? "reply" : "REPLY";
+ /* (If we put this reply=... after the `if' gcc-2.8.1 under
+ Digital Unix 4.0 generates incorrect code.) */
+ } else
+ reply = *args ? *args++ : ops['A'] ? "reply" : "REPLY";
+
What about just expanding it slightly (with appropriate comments of course)
instead of duplicating it.
e.g.
if (*args && **args == '?')
args++;
/* default result parameter */
if (*args)
reply = *args++;
else
reply = ops['A'] ? "reply" : "REPLY";
Regards,
--
Geoff Wing : <gcw@pobox.com> Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org> Ego URL : http://pobox.com/~gcw/
Zsh Stuff : <gcw@zsh.org> Phone : (Australia) 0413 431 874
next parent reply other threads:[~1999-07-15 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199907131130.NAA30286@beta.informatik.hu-berlin.de>
1999-07-15 16:20 ` Geoff Wing [this message]
1999-07-16 6:34 Sven Wischnowsky
1999-07-16 8:26 ` Geoff Wing
1999-07-16 8:56 Sven Wischnowsky
1999-07-16 9:12 Sven Wischnowsky
1999-07-16 8:45 ` Peter Stephenson
1999-07-16 9:20 Sven Wischnowsky
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=19990716022052.A29693@primenet.com.au \
--to=gcw@pobox.com \
--cc=zsh-workers@sunsite.auc.dk \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).