Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bad optimisations: (Was: Test version zsh-3.1.6-test-1)
- X-seq: zsh-workers 7166
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Bad optimisations: (Was: Test version zsh-3.1.6-test-1)
- Date: Fri, 16 Jul 1999 08:34:36 +0200 (MET DST)
- In-reply-to: Geoff Wing's message of Fri, 16 Jul 1999 02:20:52 +1000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Geoff Wing wrote:
> 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";
Note this isn't intended as an optimisation (of course), but to work
around a bug in gcc-2.8.1 under DU. And your version doesn't help
here, with that I still get the SEGV. The problem really is in the
first two lines above. It needs more than just the `args++' in after
the `if', otherwise it has a random value for `args' after the it.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author