🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1448

Re: sequence points

#1448
From: Doug Gwyn
Date: Thu, 28 Jun 1990 15:58
13 lines
1162 bytes
In article <103459@convex.convex.com> grogers@convex.com (Geoffrey Rogers) writes:
>>	func1(<argument list>) + func2(<argument list>)
>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.

The important point is that the + operator does not impose an order of
evaluation on its operands.  As you note, the arguments to a function
must be completely evaluated (including side effects) before the
function is called.  How much before is not specified, other than that
it must be after the previous sequence point.
Technical Details
Message-ID: <13261@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!haven!adm!smoke!gwyn
References: <1988@mcrware.UUCP> <103459@convex.convex.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: sequence points
Message-ID: <13261@smoke.BRL.MIL>
Date: 28 Jun 90 15:58:43 GMT
References: <1988@mcrware.UUCP> <103459@convex.convex.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 13