Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c
| From: | Zeev Suraski | Date: | Thu, 01 Jun 2000 14:32:10 +0000 |
| Subject: | Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-16035@lists.php.net to get a copy of this message | ||
Simply choose one of the two options I specified (the right one), and move
to it... Make sure you use *++r and not ++*r as I mistakenly wrote.
Zeev
On Thu, 1 Jun 2000 jah@mork.net wrote:
>
>
> On Thu, 1 Jun 2000, Zeev Suraski wrote:
>
> > What you're doing is not defined in C/C++. The order of evaluation of
> > lvalue vs. rvalue is undefined.
> >
> > So,
> >
> > *r = foo(++*r);
> >
> > Could be equivalent to both:
> >
> > *r = foo(*r);
> > ++*r;
> >
> > and
> >
> > ++*r;
> > *r = foo(*r);
> >
> > It's compiler dependant. You need to fix it...
>
> Oh no, no, no... not again :(
>
> -- Jouni
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/