From -3522381644747761859
X-Google-Thread: 7894ca11fe,2030f7dfcae4edfc
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.180.73.173 with SMTP id m13mr3121527wiv.4.1350352564457;
        Mon, 15 Oct 2012 18:56:04 -0700 (PDT)
MIME-Version: 1.0
Path: q11ni134324890wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!94.232.116.12.MISMATCH!feed.xsnews.nl!border-2.ams.xsnews.nl!xlned.com!feeder3.xlned.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.142.MISMATCH!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
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: Mon,  8 Oct 2012 09:11:55 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 42
Sender: std-cpp-request@vandevoorde.com
Approved: austern@google.com
Message-ID: <k4to76$fhu$1@dont-email.me>
References: <506de288$0$71204$742ec2ed@news.sonic.net>
NNTP-Posting-Host: 8WGHjMh66F+vQugWNNV1JlweYf3UwFXFIRbYE5Yng+w=
X-Trace: news.albasani.net lnqIy0oH6aZCdo+TWT97M68EI55vX9lG3n+oOq4kyno6iw0gMAN+7EI4Hr81REqhdcdcef2KXeUWQPdk+udu8g==
X-Complaints-To: abuse@albasani.net
NNTP-Posting-Date: Mon, 8 Oct 2012 16:11:59 +0000 (UTC)
X-Mailer: Perl5 Mail::Internet v2.05
X-Submission-Address: std-cpp-submit@vandevoorde.com
Cancel-Lock: sha1:INR+x5kdHr0o8h/Ty4n8RZsygHc=
X-Original-Date: Mon, 08 Oct 2012 07:27:01 +0200
Bytes: 2962
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

[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                      ]


