🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2601

Re: Function Argument Evaluation

#2601
From: Doug Gwyn
Date: Tue, 26 Mar 1991 22:56
17 lines
1389 bytes
In article <1991Mar25.195234.7179@sq.sq.com> msb@sq.sq.com (Mark Brader) writes:
-#  Between the previous and next sequence point an object shall have
-#  its stored value modified at most once by the evaluation of an
-#  expression.  Furthermore, the prior value shall be accessed only
-#  to determine the value to be stored.
-...
-#  If a "shall" or "shall not" requirement that appears outside of a
-#  constraint is violated, the behavior is undefined.

OK, Mark may have found a justification for obtaining undefined behavior
out of the example program we've been discussing.  This reason is separate
from the (incorrect) ones previously proposed.

In practice I would expect a well-defined result obtained by the
implementation applying a particular ordering to the unspecified
subexpression evaluation, but the program violation of a "shall"
would allow the implementation to behave randomly if it wanted to.
Technical Details
Message-ID: <15592@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn
References: <7621@polstra.UUCP> <17750@crdgw1.crd.ge.com> <1991Mar25.195234.7179@sq.sq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn
From: gwyn@smoke.brl.mil (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Function Argument Evaluation
Message-ID: <15592@smoke.brl.mil>
Date: 26 Mar 91 22:56:24 GMT
References: <7621@polstra.UUCP> <17750@crdgw1.crd.ge.com> <1991Mar25.195234.7179@sq.sq.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 17