220 37456 <CAHSYqdYiQvDvijZVMhpV=4k_nv3S8oZbrxXWPwjjCH0KmK4LXQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Hyman Rosen <hyman.rosen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Why do we need `volatile` in C++?
Date: Sun, 25 Mar 2018 13:26:54 +0000
Lines: 70
Approved: news@gmane.org
Message-ID: <CAHSYqdYiQvDvijZVMhpV=4k_nv3S8oZbrxXWPwjjCH0KmK4LXQ@mail.gmail.com>
References: <044dfdd3-2313-4ce3-a5e2-3a23c1c0d678@isocpp.org>
 <CALmDwq2LZNEv6D9Ci0VSMGEqMZhoQ5eEFeKshq4GxCZ8UD_2KA@mail.gmail.com>
 <f03a4ed6-632d-462d-849b-627b1cd7bd92@isocpp.org> <1622054.9qo2sSbJHP@tjmaciei-mobl1>
 <8f73ba25-08d7-40a7-9bf8-9adf7cb9235f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a114b332c0d25d205683c9d67"
X-Trace: blaine.gmane.org 1521984305 9078 195.159.176.226 (25 Mar 2018 13:25:05 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 25 Mar 2018 13:25:05 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKJJPVBQMKRBK6H33KQKGQEOCFO66Q@isocpp.org Sun Mar 25 15:25:01 2018
Return-path: <std-proposals+bncBDKJJPVBQMKRBK6H33KQKGQEOCFO66Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f200.google.com ([209.85.128.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDKJJPVBQMKRBK6H33KQKGQEOCFO66Q@isocpp.org>)
	id 1f05ds-0002F1-SM
	for gclcip-std-proposals@m.gmane.org; Sun, 25 Mar 2018 15:25:00 +0200
Original-Received: by mail-wr0-f200.google.com with SMTP id m7sf2362817wrb.16
        for <gclcip-std-proposals@m.gmane.org>; Sun, 25 Mar 2018 06:27:08 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1521984428; cv=pass;
        d=google.com; s=arc-20160816;
        b=rbhSDSD/bA9dnTRzSoI1fKMFLxJsrymKFIfx1m2EcHXQbiNE2BDxQ0lSRnATiSnwBx
         eOh7pREuTy99yuad7uj7pO2iF8i6I745C1mPe945/cVdPF+4/2Xj5o8f3vU6xjO3/6tB
         JMQNAdFGlNZR+DGEIEX31NF5uVkXTzgpojFhROC+jP6MPSO6g/LitRB37wfD4s5ngSQU
         WerMzXp03lITsXN/f3A2H58jLgFDbYTKR0C8RV3T6sX8MmtA1eiqFLbYVe1kifrBE6Ef
         a/vyPVrEiXIt1qKTuNOooigHBxqseY4/812p8qgETnntEa4g49Br61T3FtEcFg/ddutT
         pkrQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=PuqrmXNG+YV1ztFmfmEgLyZ7ajLP5dWSNerE+Eg37fg=;
        b=ibg5dqOnkpFLaImJJrdaRt6k3qJbnEqWHxxFjsWUjxID9Q6aOCvRSTM+PeJUD3FPe7
         sRmLmdGgZFEldTikN6m9NKbfyWdpZG3EwbPIRUW6yTQ2ZCtnVByfhiOfPxhKC53We+U7
         6BNFAjVkOLT4vBndVxUHk1qSE0TBfV3nAowTmt2b2jHtNyn8h4212m9KyU65wF1lwRGB
         IftowX/gJ4RRgpnA5bQ71wuftwERvayDnUxGDYfoicx6HQg3UGnS+XofOFeqeLRGLdQo
         /0KCyL5hQFdI7v/ewbmkCgmz9AK6x4RelNaH6E2I8VxFzbRHkyfBSKX5LAMdwISudX9V
         B9KQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=FSELQY03;
       spf=pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=PuqrmXNG+YV1ztFmfmEgLyZ7ajLP5dWSNerE+Eg37fg=;
        b=UYzxm7Jjf5ArG1RktPv/jb+s1Sp/LJ3GPARsy402TXT1wPQ0Zf97+4tr9DPzf3dra1
         gedOwBvwmouqXLZIh3uWhIzThJxlG9u79HQyqtQt6xja17+Z/sBvVr1yBhKtMzSmsOj1
         EkDNXkaUWwCV+w89p1wrCsAZWRocRHZEOw0Z/HIkrkn8Cn3GEeBcoyR+qU6JzLZgYoHw
         DrY5nBtNlXLnJDC9byroCyaoiQOSiIVQS4tRDFBaO+VUnCcE2+EUKxL9Jiv82zdbp1W1
         9oWcC6ssMb/uXeE2S0DbmdRd7ZmfIUO/sAbI2s35cpbC+J4pGHIV1PNXmt1xBEvycFoc
         +wzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=PuqrmXNG+YV1ztFmfmEgLyZ7ajLP5dWSNerE+Eg37fg=;
        b=rLd8rc8wt7oT0pRGUO+d1zGkHEbqTObY829I3IU8ZrlkC+sni7pKaZ3vPMCFFRNRha
         Au6qvoEppfpmMGMMHqOMX3Zn+ahz6cQq+Jy/eIBW+Krstla5I6r9TaNhgEwKoWtRuo64
         mI360v9tO92v90M97CylYumcrgR48qNFPBLp7zGZmoNa6KfGJQZWnWDCBm1bS9V1yT7y
         CoU9Vri4QbgJt1Cz44R05XU+LV7WK1JKfiqOlVtH7S8JZ41rDodUdXJ/qrSZ5FDRZOfF
         Bob388FzQhpDSeQ/1K3CcGPBwFXGfE1wm+pNvLIThF7EtT028LsES2h+RDZfEPe7uxZk
         vLhQ==
X-Gm-Message-State: AElRT7HHQYL2Vug/ak7bx8QC7vcGbjbMvKlZzPRXqJEDF3g+uKjiPXH+
	IGDdahDtKXWu+CWAgEi1x4fAbg==
X-Google-Smtp-Source: AG47ELuvaguYZPFj//7Nz07dGS5u8A+EwN0njH0zzlS642Zl3kcmDMX6x8q8uXHnVgfrwVOGlJirDQ==
X-Received: by 10.28.20.18 with SMTP id 18mr1655448wmu.22.1521984428200;
        Sun, 25 Mar 2018 06:27:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.134.67 with SMTP id i64ls174204wmd.2.gmail; Sun, 25 Mar
 2018 06:27:06 -0700 (PDT)
X-Received: by 10.28.195.67 with SMTP id t64mr10054596wmf.113.1521984426564;
        Sun, 25 Mar 2018 06:27:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1521984426; cv=none;
        d=google.com; s=arc-20160816;
        b=RAomDlmkdCANoBA32o5faCOsOu6t9+iKERYpU937bIAZ6kyx275TtfMvgk3sQWcsNE
         h6pZhQ/th7bOJzICO9MeKXNKILG0m/mYmmVz3G34KZUb/1e3sVLzzcwM8mRjm11QbkLK
         Qrg5CjjZGVRL0l39IpEqH4KcTivwcIf2BwM3BdJkChxu2jwNRoSjUJWkxWEjscuh5sWE
         Az6iaaD4JpOQAkWW4cmx1QlfdUQI0b9yMcxuKir0+p6k0UyLT6cyksxvdR9kwHiiGNC+
         pq7j0F/5zOKly3zCXdjfV081ZbObyj30r595OPM4emRv3Rxzrmx708XW1Gej8UzJNGjZ
         K2wQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=1vrxn5S6oKbv3xaIgMnII71HvG/yVMlSpzORA/ok0Bo=;
        b=gscdsCXg14bpoiPvkR2FZprbgbLp2zHgka5F3MWZuOZauOlTaZe7/b3Q0j7Ud4oKL4
         KGhIb3weVAnuahR87sjPdSJK8fTDsFjskuEHncQkh64QrDxEVYXnH5uNn4rFQYvi9vY8
         +ZP4YaJ3PKiPjEUbiEbw4pf0s+s86atmW7V01EYGRypEDsv80argbJMQMXd9cRCPl3KF
         EwLwyjHArUFLmsYsNPWC06GjXIDh+cE8Fa/mH2DwzcR0QYAc1iS+dHn9MKZLTF197eNv
         r5PE5myu415rLX0QVZlIQVjJ8jyHlRlrzxmMEIXPc5gwk1iourEV8tozwS71NE4GmEds
         IWDQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=FSELQY03;
       spf=pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id f14sor3637402wmi.51.2018.03.25.06.27.06
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 25 Mar 2018 06:27:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.28.101.6 with SMTP id z6mr11817325wmb.110.1521984425762;
 Sun, 25 Mar 2018 06:27:05 -0700 (PDT)
In-Reply-To: <8f73ba25-08d7-40a7-9bf8-9adf7cb9235f@isocpp.org>
X-Original-Sender: hyman.rosen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=FSELQY03;       spf=pass
 (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37456
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37456>

--001a114b332c0d25d205683c9d67
Content-Type: text/plain; charset="UTF-8"

On Sun, Mar 25, 2018, 8:52 AM Bengt Gustafsson <
bengt.gustafsson@beamways.com> wrote:

> While all of this is true volatile sees very little use compared to its
> rather large effects on the standard. I'm pretty sure that if we had a
> fresh start
> handling of memory mapped IO would be relegated to a few library
> intrinsics.
>

I've had to use volatile distressingly often, and it has nothing to do with
memory-mapped IO.  I use it to force assignments to floating-point
variables to be written to memory, denying the compiler permission to use
the value from an extended-precision register instead.  Volatile can go
only when this permission is revoked (or gcc is changed to obey the rules
properly, which won't happen because of optimizationism).

>

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdYiQvDvijZVMhpV%3D4k_nv3S8oZbrxXWPwjjCH0KmK4LXQ%40mail.gmail.com.

--001a114b332c0d25d205683c9d67
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div class=3D"gmail_quote" dir=3D"auto"><div dir=3D"ltr">=
On Sun, Mar 25, 2018, 8:52 AM Bengt Gustafsson &lt;<a href=3D"mailto:bengt.=
gustafsson@beamways.com">bengt.gustafsson@beamways.com</a>&gt; wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">While all of this is tr=
ue volatile sees very little use compared to its rather large effects on th=
e standard. I&#39;m pretty sure that if we had a fresh start<div>handling o=
f memory mapped IO would be relegated to a few library intrinsics.<br></div=
></div></blockquote></div><div dir=3D"auto"><br></div><div dir=3D"auto">I&#=
39;ve had to use volatile distressingly often, and it has nothing to do wit=
h memory-mapped IO.=C2=A0 I use it to force assignments to floating-point v=
ariables to be written to memory, denying the compiler permission to use th=
e value from an extended-precision register instead.=C2=A0 Volatile can go =
only when this permission is revoked (or gcc is changed to obey the rules p=
roperly, which won&#39;t happen because of optimizationism).</div><div clas=
s=3D"gmail_quote" dir=3D"auto"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"l=
tr"><div></div></div>
</blockquote></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAHSYqdYiQvDvijZVMhpV%3D4k_nv3S8oZbrx=
XWPwjjCH0KmK4LXQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdYiQvDvij=
ZVMhpV%3D4k_nv3S8oZbrxXWPwjjCH0KmK4LXQ%40mail.gmail.com</a>.<br />

--001a114b332c0d25d205683c9d67--

.
