220 30410 <CACGiwhHW2UG03uzL55cmnCEVx08kZufjTHosZm8MNUYghio-ww@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "D. B." <db0451@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: P0298: A byte type definition: with undefined
 pointer arithmetic?
Date: Sat, 7 Jan 2017 21:56:54 +0000
Lines: 61
Approved: news@gmane.org
Message-ID: <CACGiwhHW2UG03uzL55cmnCEVx08kZufjTHosZm8MNUYghio-ww@mail.gmail.com>
References: <e21a1901-1ed5-5795-6244-dd70c4d08adf@f2.dion.ne.jp>
 <b7eda119-bc5d-4940-b359-45088e6f4d3e@isocpp.org> <CACGiwhG2gei5=k1tO+ZVkMjoFSMyEVXwetwBKtKXQRqAXV8mgg@mail.gmail.com>
 <CACGiwhHU_WKe4q-0DFS5pdHcJHAvt+L7-gOwM9YzozNMDBAefQ@mail.gmail.com> <9dd7067b-ec8d-463c-8971-ac49a320f68f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f403045eaca878256a05458836eb
X-Trace: blaine.gmane.org 1483826242 28292 195.159.176.226 (7 Jan 2017 21:57:22 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 7 Jan 2017 21:57:22 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCWNZ4ECS4GBBKGIYXBQKGQEBCWWAXQ@isocpp.org Sat Jan 07 22:57:18 2017
Return-path: <std-proposals+bncBCWNZ4ECS4GBBKGIYXBQKGQEBCWWAXQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCWNZ4ECS4GBBKGIYXBQKGQEBCWWAXQ@isocpp.org>)
	id 1cPyyq-0004N4-3P
	for gclcip-std-proposals@m.gmane.org; Sat, 07 Jan 2017 22:56:52 +0100
Original-Received: by mail-lf0-f69.google.com with SMTP id i135sf26207967lfe.1
        for <gclcip-std-proposals@m.gmane.org>; Sat, 07 Jan 2017 13:56:56 -0800 (PST)
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:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=vmAt5rGSDsK4za8BsNm4dkbCMQJvjOtszK9mSpv5Yv0=;
        b=KOtpcs6jpOeg3alIa22c0BUzoAxRld52q/GctI+7ntIw9Vfxn76dqpmByFrmgpGPHd
         nCE6d6HCth4xiQD51y1y8aM/TlXx17BTSEz4JyaPh9v+vXAOU23IZqPhZvj5g+a4tUqc
         M3YjzAZmBayCCsCWXFsjcorJR/no/fevM5T0+aUJvoQ41J0asuQNIQ+WAuPv3RWVxkFx
         jbonTWb7JH7Lm38NbLGy5fErGtPNVD8S5rxRIhrjEha/ZMPoS180jArlAk9SfZXfLxr0
         qLPCdIkBxB/aRtfIP09KQ3MUbdyTnInj5IdcYadiumw6tupemiak8Kcdx64X5nuXSg+Z
         TKpA==
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=vmAt5rGSDsK4za8BsNm4dkbCMQJvjOtszK9mSpv5Yv0=;
        b=MBBw1x3c9FOVIrV0ALoyTjGJ0OpwMxdnzZH8a1EXpaunTHIGZuCuScPuBo2TBps0IL
         fH02PtIHOgsaUI8akuD4GXg2zOMbeaa7Qtg+OcLsCr6TogyHYPwwUn5NQkNDzTHcTD4a
         u9/3/XRItQhcYXFvXnbenWvmW/7/YaJzpL2dTbL0mjPfIB+04xdqoVPEqrJzzWkGnp3d
         WaJz+zSWdz/L/ADWIUo2S1T7EBkq2tPzGysg+8jIqLN+3gB5s8V4RXsq5H+BxKlIwAzO
         6DTx5DzJD80Tri0H7OVPRETo0s7WwJ4ax1EYDV+/i6UFPnu5JFaX4d5dba47f2ygGXiX
         dLuw==
X-Gm-Message-State: AIkVDXIN3w5Tpv4lPp6oXdkpPgW4lf9j8IF0y1x+Ca/YUDT5QM6CzGbNlOBMbBhCfF62mA==
X-Received: by 10.25.80.93 with SMTP id z29mr663437lfj.10.1483826216821;
        Sat, 07 Jan 2017 13:56:56 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.166.142 with SMTP id p136ls662971wme.0.canary-gmail; Sat,
 07 Jan 2017 13:56:55 -0800 (PST)
X-Received: by 10.28.210.81 with SMTP id j78mr1640819wmg.104.1483826215685;
        Sat, 07 Jan 2017 13:56:55 -0800 (PST)
Original-Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com. [2a00:1450:400c:c09::22c])
        by mx.google.com with ESMTPS id q141si6173493wmd.43.2017.01.07.13.56.55
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 07 Jan 2017 13:56:55 -0800 (PST)
Received-SPF: pass (google.com: domain of db0451@gmail.com designates 2a00:1450:400c:c09::22c as permitted sender) client-ip=2a00:1450:400c:c09::22c;
Original-Received: by mail-wm0-x22c.google.com with SMTP id k184so73549987wme.1
        for <std-proposals@isocpp.org>; Sat, 07 Jan 2017 13:56:55 -0800 (PST)
X-Received: by 10.223.178.9 with SMTP id u9mr6386389wra.110.1483826215264;
 Sat, 07 Jan 2017 13:56:55 -0800 (PST)
Original-Received: by 10.28.144.66 with HTTP; Sat, 7 Jan 2017 13:56:54 -0800 (PST)
In-Reply-To: <9dd7067b-ec8d-463c-8971-ac49a320f68f@isocpp.org>
X-Original-Sender: db0451@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of db0451@gmail.com
 designates 2a00:1450:400c:c09::22c as permitted sender) smtp.mailfrom=db0451@gmail.com;
       dmarc=pass (p=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:30410
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30410>

--f403045eaca878256a05458836eb
Content-Type: text/plain; charset=UTF-8

Granted, offsetting has plenty of plausible (and slapstick) workarounds,
but things like subtraction and comparison aren't nearly so lucky. Giving
the object representation *sequence* the same guarantees as *arrays* of
unsigned char would seem to solve this.

However, I can't recall whether there are dry theoretical reasons that the
Committee might prefer to remain vague and noncommittal on this... which
would be fine if not for the "sequence" wording, which to me reads like an
unfulfilled *hint* about such allowances.

FWIW: The code where I thought I needed these was completely refactored to
use arrays, albeit due to other UB that was revealed; otherwise I was
seriously considering retaining the formally disallowed subtraction. So I'm
really just an interested observer for now, without current insights into
what should or shouldn't be allowed, as others might have.

-- 
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/CACGiwhHW2UG03uzL55cmnCEVx08kZufjTHosZm8MNUYghio-ww%40mail.gmail.com.

--f403045eaca878256a05458836eb
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Granted, offsetting has plenty of plausible (and slap=
stick) workarounds, but things like subtraction and comparison aren&#39;t n=
early so lucky. Giving the object representation <i>sequence</i> the same g=
uarantees as <i>arrays</i> of unsigned char would seem to solve this.<br><b=
r></div>However, I can&#39;t recall whether there are dry theoretical reaso=
ns that the Committee might prefer to remain vague and noncommittal on this=
.... which would be fine if not for the &quot;sequence&quot; wording, which =
to me reads like an unfulfilled <i>hint</i> about such allowances.<br><br>F=
WIW: The code where I thought I needed these was completely refactored to u=
se arrays, albeit due to other UB that was revealed; otherwise I was seriou=
sly considering retaining the formally disallowed subtraction. So I&#39;m r=
eally just an interested observer for now, without current insights into wh=
at should or shouldn&#39;t be allowed, as others might have.<br></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/CACGiwhHW2UG03uzL55cmnCEVx08kZufjTHos=
Zm8MNUYghio-ww%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHW2UG03uzL=
55cmnCEVx08kZufjTHosZm8MNUYghio-ww%40mail.gmail.com</a>.<br />

--f403045eaca878256a05458836eb--

.
