Article View: comp.std.c
Article #4444Re: On sequence points and evaluation order
From: Tanmoy Bhattacharya
Date: Thu, 07 Dec 1995 16:11
Date: Thu, 07 Dec 1995 16:11
29 lines
2069 bytes
2069 bytes
In article <4a6r9u$hq5@rdsunx.crd.ge.com>, volpe@bart.crd.ge.com (Christopher R. Volpe) writes: <snip> |> |>this to satisfy the _unsatisfiable_ edict of `statements are evaluated |> |>in sequence': after all `f()+f();' is a statement --- is it done |> |>before or after the statements comprising f? |> |> It's not unsatisfiable, because the edict includes the phrase "except where |> otherwise specified", and function calls are one of those exceptions. And 6.3 `the order of evaluation of subexpressions and ... are both unspecified' (i.e. the clause which allowed interleaved expressions in the first place) does not count as `except where otherwise specified'? If the sequence point on both sides of i++ still leaves i + (a,i++,b) undefined; why should i + f() where f() is a; i++; b; be any different? Or rather, not why should it be different: it can be different by fiat. But, I do not see even the genesis of the claim that the standard currently specifies it clearly. Cheers Tanmoy -- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242) Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544 Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>, <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/ internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html> fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID:
<4a73n0$jfu@newshost.lanl.gov>Path:
arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoyReferences:
<49l428$od0@bolverk.cs.cornell.edu> <49ojjp$hsm@newshost.lanl.gov> <49qiu7$25h@natasha.rmii.com> <49v3ii$nve@rdsunx.crd.ge.com> <1995Dec6.000503.6676@sq.com> <TANMOY.95Dec5221739@qcd.lanl.gov> <4a6r9u$hq5@rdsunx.crd.ge.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) Newsgroups: comp.std.c Subject: Re: On sequence points and evaluation order Date: 7 Dec 1995 16:11:12 GMT Organization: Los Alamos National Laboratory Distribution: world Message-ID: <4a73n0$jfu@newshost.lanl.gov> References: <49l428$od0@bolverk.cs.cornell.edu> <49ojjp$hsm@newshost.lanl.gov> <49qiu7$25h@natasha.rmii.com> <49v3ii$nve@rdsunx.crd.ge.com> <1995Dec6.000503.6676@sq.com> <TANMOY.95Dec5221739@qcd.lanl.gov> <4a6r9u$hq5@rdsunx.crd.ge.com> NNTP-Posting-Host: qcd.lanl.gov