Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bad optimisations: (Was: Test version zsh-3.1.6-test-1)



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