Function Argument Evaluation

Christopher R Volpe volpe at camelback.crd.ge.com
Sat Mar 23 00:11:29 AEST 1991


In article <15538 at smoke.brl.mil>, gwyn at smoke.brl.mil (Doug Gwyn) writes:
|>In article <17750 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com
(Christopher R Volpe) writes:
|>>So, the output has to be "100 200".
|>
|>Wrong.  "200 200" is a possible output from a conforming implementation.
|>I thought the cited section of the standard was unusually clear about this.

Ok, but I believe that is true only because the behavior is undefined
(a fact which I missed until I saw Colin's post), right? I mean, the only
reason "200 200" is a possible output in this case is because 
"Happy new year!" is also a possible output, not because of the original
author's reasoning about the value of 'p' at the time of the call.
I think that's an important distinction, no? Is there a distinction?
Is it not true that the value of 'p' is irrelevant when the actual
argument is the assignment expression 'p = &x'? Or am I completely out
in left field?     
==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.std.c mailing list