220 35627 <CAHSYqdbtHNzYeJnvPwnLTkFt4auuRQt2BLTkCR-hn1bW0MO9OA@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: Re: Rotational shift operator
Date: Wed, 29 Nov 2017 16:47:03 -0500
Lines: 92
Approved: news@gmane.org
Message-ID: <CAHSYqdbtHNzYeJnvPwnLTkFt4auuRQt2BLTkCR-hn1bW0MO9OA@mail.gmail.com>
References: <69593098-e2cc-487e-bd14-9001b27aa7c1@isocpp.org>
 <8176d75b-8df7-40ba-af35-d8213937d5bc@isocpp.org> <CANPtknynPeDfCyzYLf1x-eWqtvsDjjL4M1bfvSEE2fLrG5GrpA@mail.gmail.com>
 <1873023.0OMUIGm3aL@tjmaciei-mobl1> <ovm0ce$vi3$1@blaine.gmane.org>
 <CAHSYqdaRr7wbFNriX9ZzJ1unOzEEBr-Yb+oe0KU4Mz0FNcc4PA@mail.gmail.com> <4a4ac39b-d14f-8aea-1739-6c819cd1f8c6@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="089e082fa0ecbb74e8055f26144b"
X-Trace: blaine.gmane.org 1511992049 23284 195.159.176.226 (29 Nov 2017 21:47:29 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 29 Nov 2017 21:47:29 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKJJPVBQMKRB3OV7TIAKGQE5RCHR7Q@isocpp.org Wed Nov 29 22:47:25 2017
Return-path: <std-proposals+bncBDKJJPVBQMKRB3OV7TIAKGQE5RCHR7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f199.google.com ([209.85.128.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDKJJPVBQMKRB3OV7TIAKGQE5RCHR7Q@isocpp.org>)
	id 1eKACN-0005NL-ED
	for gclcip-std-proposals@m.gmane.org; Wed, 29 Nov 2017 22:47:19 +0100
Original-Received: by mail-wr0-f199.google.com with SMTP id 96sf2683117wrk.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 Nov 2017 13:47:27 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1511992046; cv=pass;
        d=google.com; s=arc-20160816;
        b=qTMXA3po8e3eNN6IDCKiEi6WmAOhs3mR3qLmk/vAMhr9mD8nEQ0FQGyHFufgN+MLdN
         in8NQ4bd/Rb+Nv5O8ZK8j4ihpSZn3vQtC6omaK3eTdUkhAsuniXmZFH+kuCo9QIv0VRy
         XSRRfrN4o3EWm+LLV+GtA58kPz9rprLO+zJvVovrBIZM+8HVqQBdOodnzDiQlNDM3CaP
         ZMfomZDeTD0CeDW2h3A2hCtbbo2EouHQ2Z/b3MXi4HuG/BKS/KPFI2/Ilr982kD5EK+1
         FUsRP1bL7Ifof9MC03cDK6ensEYwdsLTXenn8Ux3uj/w55D48rMQHTMTpQXISiSyJdqz
         cgRA==
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:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=K/wpWOZgFBH7clG26h+ZG7GG4WwvLgyeCBWbkQaMfZ8=;
        b=aYSMENeEtSbEzgd7q1TPEZ+LkT/BMPKw50o+RrznBTEDagKlla/q2RQ5EJ8eSDJQ0I
         nVctNWveMYe+eDeDUTA8p5RA6yWhUzdIXz80xSXp/WjUHPwF/Ofr7lQVuf1/syKgeQVH
         wHvErlF66BUrY+QzPmycBeDzG0oulvK2L852BdUKUx8zD/8BbtSu88Hq0sTrMX8FLCpe
         bKTAo/CtfmGwIprytdLC5pFvpNi+yXzXuMl3vTNdDE4G6/weTT/DTMTii91+OL7Ra7sv
         a1NKgA1fooB3RGu0/FtQ6hOiDk3gpsGErFlNhL/BC43OqbqchXt2Z4j1EcXDJZAOa/Po
         /Qcw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=VQESUlIz;
       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=NONE 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:in-reply-to:references: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=K/wpWOZgFBH7clG26h+ZG7GG4WwvLgyeCBWbkQaMfZ8=;
        b=Xz36P5kKKImhNcYxg4AXDFC4pP+t5xNw88SYNBdYHD98sV/xPIkrb9NidKglnvlhWA
         lG6gmudiaGdsHo3gPZq5wRioKQ9oHCeeU3lQNWuZVdbvim+Cwv09YfOrdQZRuqI+OUFX
         9KRqv4OD9l/XQqBeFv+3uHKidJMAE47eggEmsPAQem7KuwcY65X6KQDGV01R830KI2TF
         m1spbtr+hGm9p0EGlk1jEcNOaZV+BxQrz18KOTsI3ZQOs9YlBpLNN0wcPh1bm5ZNnsoZ
         z6UnuszeoI/oL5yYgpXJV70GW7/KeXhP/k+JDe2nI1boxl65JvP/maLsL5cAxFjwzbmZ
         rZgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references: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=K/wpWOZgFBH7clG26h+ZG7GG4WwvLgyeCBWbkQaMfZ8=;
        b=V3QAUarkxGfZ/R2kmx+hhabwxaG6SVHpltBmVSJqf/4fSQe4Oka3u9Jey+OuGthx8b
         WvSBzUu8dLHSHkZ1lFt+RSY0+7v28UGFbh+g6sAq2dwQsMiQkT1CefXeObqm3LMKUG70
         GeZMJpBxBmUTnXZeSdTwE1G62xghZM3kml4TRtvl2qKzWRZKObGrgz7d9uNT9FKW/9Fs
         u03KQUjftQpJAp38NK7pz0N2b6xdknLTKa+eoeTgmi3/RNbcjCaX5n8pomEXgHQR9o2c
         ISKZohVuA5Iriiula3c6y0r/BeCOWonKJ09NPlYtcOFKnh33E4Vcbh8KABPDjl1alodA
         PQOQ==
X-Gm-Message-State: AJaThX7CaqiEdODueINvJVc8tWkVcAtBW8e3LOGLzKJlHh7gHWuUZ7Dg
	/9tFWLp0gasda7NqxrGFACFZlg==
X-Google-Smtp-Source: AGs4zMbr7+5qL+NR2DA1PEJEr3atbVmDM5HFYDnElMkN+89f/j2MgyY3POKSceJa9mnPvGev6LcroQ==
X-Received: by 10.28.26.19 with SMTP id a19mr27978wma.14.1511992046849;
        Wed, 29 Nov 2017 13:47:26 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.144.2 with SMTP id s2ls4515551wmd.12.canary-gmail; Wed, 29
 Nov 2017 13:47:25 -0800 (PST)
X-Received: by 10.28.170.75 with SMTP id t72mr158944wme.15.1511992045371;
        Wed, 29 Nov 2017 13:47:25 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1511992045; cv=none;
        d=google.com; s=arc-20160816;
        b=evYdn9z5AW7bYLv113WLYBn5y/+Wyljaf+PGrWzuseAyFNehlCagnk2+y0gyPsarLf
         N6WNqdfbULuFxHgKudxMksy0LtnMfprwmIv6KsmCVv/80AehIZrti08pNWkaUshB6ILe
         VfTISdMIT9DBG0Fn1rU8xFk9FxswvF0HUqM2JSlk6VbYE6TJmVFF5YwZf7Ms3Ovy4NtZ
         src2/Chv+Ce5ePASOgag5Mbij1qZ64wewCZ0Nc1pS4Mz3S33yFLvFDpAnP0u3YvcxDAK
         7K6e0SI/HgAksFbFgnjI80KGyPHdQK0bnfGnp0u3nkY9QzBzFALAJs45DhM26t+l3776
         KzWw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=Katiqc5Uwa/G1CFvEA0LzPq88S0SnY42eRf5LAlwUl0=;
        b=u8YZozDtSJvzf5wSfYgpmLruuRD9fwJwmR3Oc+Mv4rUUxlefSHr6i2XOaiSuMgRkZN
         3bghYjuT/QBPpQKjrpSueyWKD8NMR9TSOItGlwECqzzj/2b2I7WYO41OCnHPC2A7E62x
         RXt6JwK+HFZDlOil2dburA4FKGmIdUv43pKsxt4GiaWvPncjJf948Uoc7OhzFV6IJ/Xh
         0yJmU1sT4GBXFigPpns599qAntatfG8Abjx/Sw/nOczuYhxiozhmGMvGJE4BKMgMHk3w
         YKgb+5ThgchEdxy8uutl1fTZIgMC4XYRsXadtZtSwsvFycxrI0heX4zFfZNlmWhjjb5K
         3D/w==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=VQESUlIz;
       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=NONE 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 z66sor770538wmb.10.2017.11.29.13.47.25
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 29 Nov 2017 13:47:25 -0800 (PST)
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.190.12 with SMTP id o12mr158218wmf.148.1511992044777;
 Wed, 29 Nov 2017 13:47:24 -0800 (PST)
Original-Received: by 10.28.57.214 with HTTP; Wed, 29 Nov 2017 13:47:03 -0800 (PST)
In-Reply-To: <4a4ac39b-d14f-8aea-1739-6c819cd1f8c6@gmail.com>
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=VQESUlIz;       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=NONE 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-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:35627
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35627>

--089e082fa0ecbb74e8055f26144b
Content-Type: text/plain; charset="UTF-8"

On Wed, Nov 29, 2017 at 2:00 PM, Matthew Woehlke <mwoehlke.floss@gmail.com>
wrote:

> On 2017-11-29 12:43, Hyman Rosen wrote:
> > If I write *p = 1; if (!p) foo(); then the compiler should
> > not eliminate the test.
>
> Why not? In no case will `foo()` execute. If `p`, the condition is
> false. If `!p`, the condition is irrelevant because the preceding line
> will cause a SEGV.


You are making assumptions that don't always hold.

On SunOS, given the following program pz.cpp:

int main() { char *volatile p = 0; return *p; }

built like this:

gcc -o pz pz.cpp /usr/lib/0@0.so.1

running it does not cause a SEGV:

% ./pz
% echo $?
0

-- 
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/CAHSYqdbtHNzYeJnvPwnLTkFt4auuRQt2BLTkCR-hn1bW0MO9OA%40mail.gmail.com.

--089e082fa0ecbb74e8055f26144b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On W=
ed, Nov 29, 2017 at 2:00 PM, Matthew Woehlke <span dir=3D"ltr">&lt;<a href=
=3D"mailto:mwoehlke.floss@gmail.com" target=3D"_blank">mwoehlke.floss@gmail=
..com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex"><span class=3D"gmail-">On 2017-11-29 12:43, Hyman Rosen wrote:<br>
&gt; If I write *p =3D 1; if (!p) foo(); then the compiler should<br>
&gt; not eliminate the test.<br>
<br>
</span>Why not? In no case will `foo()` execute. If `p`, the condition is<b=
r>
false. If `!p`, the condition is irrelevant because the preceding line<br>
will cause a SEGV.</blockquote><div><br>You are making assumptions that don=
&#39;t always hold.=C2=A0</div><div><br>On SunOS, given the following progr=
am <font face=3D"monospace, monospace">pz.cpp</font>:<br></div></div></div>=
<blockquote style=3D"margin:0px 0px 0px 40px;border:none;padding:0px"><div =
class=3D"gmail_extra"><div class=3D"gmail_quote"><div><div><font face=3D"mo=
nospace, monospace">int main() { char *volatile p =3D 0; return *p; }</font=
></div></div></div></div></blockquote><div class=3D"gmail_extra"><div class=
=3D"gmail_quote"><div>built like this:<br></div></div></div><blockquote sty=
le=3D"margin:0 0 0 40px;border:none;padding:0px"><div class=3D"gmail_extra"=
><div class=3D"gmail_quote"><div><font face=3D"monospace, monospace">gcc -o=
 pz pz.cpp /usr/lib/0@0.so.1</font></div></div></div></blockquote><div clas=
s=3D"gmail_extra"><div class=3D"gmail_quote"><div>running it does not cause=
 a SEGV:<br></div></div></div><blockquote style=3D"margin:0 0 0 40px;border=
:none;padding:0px"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><d=
iv><font face=3D"monospace, monospace">% ./pz</font></div></div></div><div =
class=3D"gmail_extra"><div class=3D"gmail_quote"><div><font face=3D"monospa=
ce, monospace">% echo $?</font></div></div></div><div class=3D"gmail_extra"=
><div class=3D"gmail_quote"><div><font face=3D"monospace, monospace">0</fon=
t></div></div></div></blockquote><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><div><br>=C2=A0</div></div></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/CAHSYqdbtHNzYeJnvPwnLTkFt4auuRQt2BLTk=
CR-hn1bW0MO9OA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdbtHNzYeJnv=
PwnLTkFt4auuRQt2BLTkCR-hn1bW0MO9OA%40mail.gmail.com</a>.<br />

--089e082fa0ecbb74e8055f26144b--

.
