sequence points

Geoffrey Rogers grogers at convex.com
Thu Jun 28 09:30:12 AEST 1990


In article <1988 at mcrware.UUCP> jejones at mcrware.UUCP (James Jones) writes:
>Suppose one has an expression of the form
>
>	func1(<argument list>) + func2(<argument list>)
>
>Can a standard-conforming implementation evaluate *both* argument lists before
>calling either function?
>

The dp ANSI, Dec 89, page 42, states "The order of evaluation of the function
designator, the arguments, and subexpressions within the arguments are 
unspecified, but there is a sequence point before the actual call". This
would lead me to believe that you can evaluate all of the arguments for
both functions before calling either one. Most compilers I seen do evaluation
a function at a time.

+------------------------------------+---------------------------------+
| Geoffrey C. Rogers   		     | "Whose brain did you get?"      |
| grogers at convex.com                 | "Abbie Normal!"                 |
| {sun,uunet,uiucdcs}!convex!grogers |                                 |
+------------------------------------+---------------------------------+



More information about the Comp.std.c mailing list