Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | =3D?ISO-8859-1?Q?Daniel_Kr=3DFCgler?=3D <daniel.kruegler@googlemail.c= om> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: What's a "side effect" |
| Date | 2012-10-08 09:11 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <k4to76$fhu$1@dont-email.me> (permalink) |
| References | <506de288$0$71204$742ec2ed@news.sonic.net> |
[2nd attempt after three days] On 2012-10-05 10:35, Andy Lutomirski wrote: > > I'm trying to userstand the memory model. [intro.multithread] mentions > lots of things like: > > A release sequence ... is a maximal contiguous sub-sequence of side effects > > I know what a /visible/ side effect is (see #13), but that doesn't tell > me what a side effect is in the first place. I assume that a "side > effect" is just a write (e.g. "a = b" has a side effect of modifying a= ), > but AFAICS the N3376 has no language to support that assumption. I think that the current wording defines what a /side effect/ is. This is specified in [intro.execution] p12: "Accessing an object designated by a volatile glvalue (3.10), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all /side effects/, which are changes in the state of the execution environment. Evaluation of an expression (or a sub-expression) in general includes both value computations (including determining the identity of an object for glvalue evaluation and fetching a value previously assigned to an object for prvalue evaluation) and initiation of side effects. When a call to a library I/O function returns or an access to a volatile object is evaluated the side effect is considered complete, even though some external actions implied by the call (such as the I/O itself) or by the volatile access may not have completed yet." HTH & Greetings from Bremen, Daniel Kr=FCgler -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Find similar
What's a "side effect" Andy Lutomirski <luto@amacapital.net> - 2012-10-05 02:35 -0600 Re: What's a "side effect" James Kuyper <jameskuyper@verizon.net> - 2012-10-07 07:43 -0700 Re: What's a "side effect" =3D?ISO-8859-1?Q?Daniel_Kr=3DFCgler?=3D <daniel.kruegler@googlemail.c= om> - 2012-10-08 09:11 -0700
csiph-web