220 31797 <3421677.yAxhhm3ryH@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Tue, 28 Mar 2017 00:04:11 -0700
Lines: 52
Approved: news@gmane.org
Message-ID: <3421677.yAxhhm3ryH@tjmaciei-mobl1>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org> <6096248.pKJ4QPQkKS@tjmaciei-mobl1> <4E0805FE-B97D-4A93-956D-9281B3207F39@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1490684658 3248 195.159.176.226 (28 Mar 2017 07:04:18 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 07:04:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB34V5DDAKGQEDDWT5NI@isocpp.org Tue Mar 28 09:04:13 2017
Return-path: <std-proposals+bncBCB4TK757YBRB34V5DDAKGQEDDWT5NI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f198.google.com ([209.85.128.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRB34V5DDAKGQEDDWT5NI@isocpp.org>)
	id 1cslAo-00005N-3I
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 09:04:10 +0200
Original-Received: by mail-wr0-f198.google.com with SMTP id 58sf47317381wrv.23
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 00:04:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :content-transfer-encoding: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=wUAb9/giW+KU4FhLSEXY7GjLvrDDzYj1lJ2w6BQevvQ=;
        b=xyz8yEz/CkEkJQrfBZvN160kEA/EUxWeRruemqkbIYebJ+xf+r4FhQBwev+/pt9A4Y
         SL+47/pezxtQd9A2N9zx3xQKyJ+ca9lPGDsJJDLhdmNl2hULA/FNGwCCJW4en+KB2jKZ
         kTy60G9qmSI4KX1LqglJIQ61E0BGWuQsJvVvOFxHnhUe4JoChfNZOK7D/oBK+UT6MzJN
         IMM8dBga6utx2U/BMYQXz2vbb0haYtAcLB2zPe9HFpuTKXaIYNdzo/LDTXOhDJNIL7uR
         149N8mAvKQ7HW2skyxQuVMiy818p0/DiydQk1wSrFCiagEvKTHis+syyahZTn0tZTkH6
         4Dyg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding: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=wUAb9/giW+KU4FhLSEXY7GjLvrDDzYj1lJ2w6BQevvQ=;
        b=bLWjALYTqlb/mjZuhS/dQKnmyq8lBUzcwS5PLwt0u84bUxhItg2PvcAK4ktlqF1sZP
         BwAxhuqCmw/cY9ccKdfrWu2/poJ0hYWR0pJaP04hhKBHPP05z5FOzdDDSGX0I9ndwvNh
         iaROkvqm/nhX7AMSIjXD8+P37WhBez7BIO9pqCidleyQBAH3avgH5flmNJFFwiKctGP+
         8tfQ2V89YXS/gXsRHjOwW14v9TdHhvg7brTmJ4/XVTfWSmqC91v67mnGQU0+LkT6Ke/l
         lGFTp44TnlllMCjo2LcrMH16Pt+atiDA+LnC7aZ7dOQj48ssC1qqeb+Qhufb2kXmtTwF
         I8Y 
X-Gm-Message-State: AFeK/H3URQZIZBW0rhbyNKTRCc8r7qB/iaAoeY5wiGC6ziHNtJdfULc4pLyEeEGRUXBe7Q==
X-Received: by 10.223.163.206 with SMTP id m14mr1675122wrb.15.1490684656226;
        Tue, 28 Mar 2017 00:04:16 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.160.139 with SMTP id j133ls893094lfe.48.gmail; Tue, 28 Mar
 2017 00:04:14 -0700 (PDT)
X-Received: by 10.25.227.5 with SMTP id a5mr12939958lfh.118.1490684654724;
        Tue, 28 Mar 2017 00:04:14 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id y25si1493089ljd.181.2017.03.28.00.04.14
        for <std-proposals@isocpp.org>;
        Tue, 28 Mar 2017 00:04:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:a40e:c587:f6be:c56d])
	by gondolin.macieira.info (Postfix) with ESMTPSA id BA92211B7CE
	for <std-proposals@isocpp.org>; Tue, 28 Mar 2017 00:04:13 -0700 (PDT)
In-Reply-To: <4E0805FE-B97D-4A93-956D-9281B3207F39@gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:31797
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31797>

Em segunda-feira, 27 de mar=C3=A7o de 2017, =C3=A0s 23:47:55 PDT, Alberto B=
arbati=20
escreveu:
> > And yet it's in use.
> > https://github.com/v8/v8/blob/master/src/x64/codegen-x64.cc#L33
>=20
> Thanks Thiago for the pointer. According to my (possibly incorrect)
> interpretation this code raises undefined behavior because __ is reserved
> "for any use", which I would expect includes the use as a macro name. I m=
ay
> be wrong, but I'd expect little sympathy in the committee about potential=
ly
> breaking it. By the way, this code might possibly not break, because they
> were clever to put #undefs in it. Incidentally, the code would indeed bre=
ak
> if we defined __ to be a macro...

Right. We can say it's V8's own fault for using a reserved identifier. It's=
=20
like when Qt (qlalr) had an identifier called _Nullable, but that got=20
repurposed by a recent Clang change.

I'm just saying it's known to be in use in a fairly major project. You know=
,=20
the one that is behind Node.js and a whole ecosystem. The argument in the=
=20
paper that says it's little used is incorrect: it's not like pre-C++11 "aut=
o",=20
which had exactly one use in the entire Microsoft source code.

I guess we could convince GCC and Clang to print a warning about it if it=
=20
looks like this is going forward, so the V8 developers start fixing it. May=
be=20
we'll get some of these fixed too:

http://lxr.free-electrons.com/source/include/linux/compiler.h#L115
http://lxr.free-electrons.com/source/include/asm-generic/fixmap.h#L73

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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/3421677.yAxhhm3ryH%40tjmaciei-mobl1.

.
