220 31938 <CAA7YVg2JX6_sSFzyMV3hw9QfUw4JAmq7qr-J6NMC8Roez3kVhg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Viacheslav Usov <via.usov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: multiple identically named variables
Date: Mon, 3 Apr 2017 11:34:43 +0200
Lines: 92
Approved: news@gmane.org
Message-ID: <CAA7YVg2JX6_sSFzyMV3hw9QfUw4JAmq7qr-J6NMC8Roez3kVhg@mail.gmail.com>
References: <CAA7YVg36Lk6wGAHNcWky-NCQpPPKmVq9sAnWrXYmj-DLqzTObA@mail.gmail.com>
 <CAFk2RUZBDyBuz7XnnK5pawZ0F_26AVLFjK+jUo3e0JdUq4G6Ng@mail.gmail.com>
 <CAA7YVg2T+Mt6Las_QMwhFP8Oqn1BSS+iQG-_JqxCTxsu04VEnA@mail.gmail.com> <CA+6mTDcNM+V1Lxsu4-gqthq88WjvQq9s_CEWnw5M7JqR+j5FAw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=94eb2c070e988967b0054c3fde79
X-Trace: blaine.gmane.org 1491212083 810 195.159.176.226 (3 Apr 2017 09:34:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 3 Apr 2017 09:34:43 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDU6VRPKW4BBBNFORDDQKGQENXZDMIQ@isocpp.org Mon Apr 03 11:34:39 2017
Return-path: <std-proposals+bncBDU6VRPKW4BBBNFORDDQKGQENXZDMIQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f198.google.com ([209.85.213.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDU6VRPKW4BBBNFORDDQKGQENXZDMIQ@isocpp.org>)
	id 1cuyNj-000817-2n
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Apr 2017 11:34:39 +0200
Original-Received: by mail-yb0-f198.google.com with SMTP id c126sf6461072ybf.6
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Apr 2017 02:34:45 -0700 (PDT)
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=/vGtpszblFmF0ypJB4PQS4rAppqx+tJXxEmM+zuMUCE=;
        b=giKRpihznFg7Q+Rut8kE8EbTAfn/IkHzHpHxFX8Lu4cwHSR1qNNMr7rR51r518mZ81
         WifYCFXslj6W581UF1mH67WBNHq07Zdv+n7v9Sal/0tH+JEQ3Ht+Q50XUUb/RTMqX6WD
         pJGp5UwSMrKFK1eldbshQWNd0LwpnlesmHwx16yFeqfWG84YaWqNKPm0+49gdBsP6e02
         u3Ol7+3jILCvEIaCobMR6GR8ybRJV6i3UTfrNURMl4+FDH5KsngTmy0Act1ZthB30hVb
         4NV2YKjK4nPg7CCdnN9Jw1O0Cg8/PxC7jSKQrfdRPclocO5xdf9UIHJGluWY4Q73tVAr
         smwA==
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=/vGtpszblFmF0ypJB4PQS4rAppqx+tJXxEmM+zuMUCE=;
        b=AXt1E45XWLWSj3ZaqoDY5+Mhbvk1BFJXBwgdVM5TTySBVHIUNHeIFMYlY8ks/LZCgj
         ZT+xEzNkfFndtRTJNewUDjwKWTiljBdJHa2DkSBx+n7bzMmlElrHm3u6a55SkCJnSwTN
         f3IJa95zT5wcDH8UWO/2VDHT7MNl1TEx6Esia8s6oouMnfZFU0Cb+7ijg9RUSg+3KEch
         hsocQpP0gPKxq+cUoSkgXCd56mdcu49yuj5o9oUYiIYwXBSWq0YSsCqvTAIXeaj64uMY
         +R4O8LnCPYavzyH+pwq865/rl3G1AgNLJJnMtnazrxyJn4GOINFEeCiao7dd080cCjGV
         y5uQ==
X-Gm-Message-State: AFeK/H3BV/RALHzXwxDlb/Y9mYmz07R9tVeOMeyNnPun/MZAiotrWBYWry9cTlk6qvEG/g==
X-Received: by 10.129.108.146 with SMTP id h140mr7439657ywc.4.1491212084793;
        Mon, 03 Apr 2017 02:34:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.39.226 with SMTP id c89ls698953otb.2.gmail; Mon, 03 Apr
 2017 02:34:44 -0700 (PDT)
X-Received: by 10.233.235.148 with SMTP id b142mr15347320qkg.284.1491212084085;
        Mon, 03 Apr 2017 02:34:44 -0700 (PDT)
Original-Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com. [2607:f8b0:400d:c09::22e])
        by mx.google.com with ESMTPS id a90si2171629qkj.276.2017.04.03.02.34.44
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 03 Apr 2017 02:34:44 -0700 (PDT)
Received-SPF: pass (google.com: domain of via.usov@gmail.com designates 2607:f8b0:400d:c09::22e as permitted sender) client-ip=2607:f8b0:400d:c09::22e;
Original-Received: by mail-qk0-x22e.google.com with SMTP id h67so10136897qke.0
        for <std-proposals@isocpp.org>; Mon, 03 Apr 2017 02:34:44 -0700 (PDT)
X-Received: by 10.55.177.68 with SMTP id a65mr14658748qkf.45.1491212083748;
 Mon, 03 Apr 2017 02:34:43 -0700 (PDT)
Original-Received: by 10.12.157.78 with HTTP; Mon, 3 Apr 2017 02:34:43 -0700 (PDT)
In-Reply-To: <CA+6mTDcNM+V1Lxsu4-gqthq88WjvQq9s_CEWnw5M7JqR+j5FAw@mail.gmail.com>
X-Original-Sender: via.usov@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of via.usov@gmail.com
 designates 2607:f8b0:400d:c09::22e as permitted sender) smtp.mailfrom=via.usov@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:31938
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31938>

--94eb2c070e988967b0054c3fde79
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 3, 2017 at 11:13 AM, Maxim Yanchenko <maxim.yanchenko@gmail.com=
>
wrote:

> If Viacheslav's proposal goes forward I'd like to see the scoping working
> in initialization of such variables like this:
>
> int x=3D5;
> {
>   double x=3Dx; // initialized from int
> }
> {
>   float x=3Dx; // initialized from int, not from double
> }
>
>
The above would conflict with [basic.scope.pdecl]:

The point of declaration for a name is immediately after its complete
declarator (Clause 8) and before its initializer (if any), except as noted
below. [ Example:

 unsigned char x =3D 12;
 { unsigned char x =3D x; }

Here the second x is initialized with its own (indeterminate) value. =E2=80=
=94 end
example ]

(end)

I doubt we can change that easily.

Cheers,
V.

--=20
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 e=
mail 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/CAA7YVg2JX6_sSFzyMV3hw9QfUw4JAmq7qr-J6NMC8Roez3k=
Vhg%40mail.gmail.com.

--94eb2c070e988967b0054c3fde79
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 M=
on, Apr 3, 2017 at 11:13 AM, Maxim Yanchenko <span dir=3D"ltr">&lt;<a href=
=3D"mailto:maxim.yanchenko@gmail.com" target=3D"_blank">maxim.yanchenko@gma=
il.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex"><div dir=3D"ltr"><div><div><div>If Viacheslav&#39;s proposal goes fo=
rward I&#39;d like to see the scoping working in initialization of such var=
iables like this:<br><br></div>int x=3D5;<br>{<br></div>=C2=A0 double x=3Dx=
; // initialized from int<br>}<br>{ <br>=C2=A0 float x=3Dx; // initialized =
from int, not from double<br>}<br><br></div></div></blockquote><div><br></d=
iv><div>The above would conflict with [basic.scope.pdecl]:<br></div><div><b=
r></div><div>The point of declaration for a name is immediately after its c=
omplete declarator (Clause 8) and before its
initializer (if any), except as noted below. [ Example:</div><div><br></div=
><div>=C2=A0unsigned char x =3D 12;</div><div>=C2=A0{ unsigned char x =3D x=
; }</div><div><br></div><div>Here the second x is initialized with its own =
(indeterminate) value. =E2=80=94 end example ]<br></div><div><br></div><div=
>(end)</div><div><br></div><div>I doubt we can change that easily.</div><di=
v><br></div><div>Cheers,</div><div>V.</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/CAA7YVg2JX6_sSFzyMV3hw9QfUw4JAmq7qr-J=
6NMC8Roez3kVhg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAA7YVg2JX6_sSFzy=
MV3hw9QfUw4JAmq7qr-J6NMC8Roez3kVhg%40mail.gmail.com</a>.<br />

--94eb2c070e988967b0054c3fde79--

.
