Re: backtrace
| From: | Zeev Suraski | Date: | Fri, 01 Sep 2000 13:34:33 +0000 |
| Subject: | Re: backtrace | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31568@lists.php.net to get a copy of this message | ||
On Fri, 1 Sep 2000, Sascha Schumann wrote:
> > I didn't say everything works if it compiles. I said copying va_list's
> > works if it compiles.
>
> See? It is not so hard to write what you mean and it avoids
> misunderstandings.
You've got to be kidding me. You truly assumed I wasn't aware of the fact
that binaries (that obviously got compiled successfully) can crash?
Do you want me to talk in formal English each time I talk to you? I can
do that, but in my opinion, it would be an insult to your intelligence.
Loosening up and figuring out the obvious like most other people would be
much better.
> > > > > 1.: "The object ap may be passed as an argument to another
> > > > > function; if that function invokes the va_arg macro
> > > > > with parameter ap, the value of ap in the calling
> > > > > function is indeterminate and shall be passed to the
> > > > > va_end macro prior to any further reference to ap.
> > > >
> > > > Where are you reading this? It sounds very odd and I assume it would be
> > > > wrong (or otherwise useless to do) on every implementation.
> > >
> > > "7.15 Variable arguments <stdarg.h>," paragraph 3, page 262,
> > > ISO/IEC 9899:1999.
> >
> > So it falls under the 'otherwise useless to do' IMO.
>
> "it"? The part I quoted?
Yes.
> Most of these rules have been established, because some
> implementations already behaved that way. The above rule has
> no obvious inner logic, but it reflects common practice (at
> least at the time of writing; this part dates back to 1990).
I would guess so, even though I can't find a good reason for it, and I've
yet to meet an implementation on which it would make sense. I guess
there's always the possibility that such an implementation exists.
> > That's mostly right. Essentially it assumes almost as much as va_list foo
> > = va_list bar; assumes. The only difference is that in this case,
> > implementations may also use arrays to represent va_list (because arrays
> > cannot be lvalues).
>
> The other significant difference is that the proposal is
> aligned with the requirements of ISO C99, because it passes
> ap by reference, not by value (which would have the earlier
> described side effects).
Ok.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/