220 35405 <1747398.ysixVUWvEu@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: Re: On P0829 - a freestanding implementation
Date: Sun, 19 Nov 2017 11:16:34 -0800
Lines: 39
Approved: news@gmane.org
Message-ID: <1747398.ysixVUWvEu@tjmaciei-mobl1>
References: <32147114.z48B4pQc9d@tjmaciei-mobl1> <9215639.TL3RHUUBQ5@tjmaciei-mobl1> <25d0417e-8fa0-47ee-a70b-3ce7b10c1fee@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1511118997 29530 195.159.176.226 (19 Nov 2017 19:16:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 19 Nov 2017 19:16:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBFFRY7IAKGQEVL2OVMQ@isocpp.org Sun Nov 19 20:16:31 2017
Return-path: <std-proposals+bncBCB4TK757YBRBFFRY7IAKGQEVL2OVMQ@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+bncBCB4TK757YBRBFFRY7IAKGQEVL2OVMQ@isocpp.org>)
	id 1eGV4w-0007Gf-Gr
	for gclcip-std-proposals@m.gmane.org; Sun, 19 Nov 2017 20:16:30 +0100
Original-Received: by mail-wr0-f198.google.com with SMTP id b79sf4756591wrd.19
        for <gclcip-std-proposals@m.gmane.org>; Sun, 19 Nov 2017 11:16:38 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1511118998; cv=pass;
        d=google.com; s=arc-20160816;
        b=G0ljkco45nnML+9z2CozHNuyPuwmGg28zwwafTK3rvp8i+nSQOVYgQnwlipbpOC563
         7p8DXNpIg7L19krrSS4+B+rDoz6ZZ8IIHQEoPi0BNiealHk2TnUMyaYlxFqAZynQLjtq
         ItvyaWGg71PJPT34A91/o57H3at52XYc1o+VEltWlspNHvjgu52qfSBGPdeccZ0AUCog
         DhD9i1pwq6Dge9FGKTWIyQNe9FaTPKqeyK/rwn8rNFK8/sXIK37Noor+8vw1sHP66S/n
         EhqNvtdkRLNwgB/DTVCSB88IglNUohTQPvOxYgLy92FWwkN7se9qYZ8zbTbnIYiKhfdA
         Ujzg==
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:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=MqeJ2P5N+mBEELapS9SIrVXDqKBUsl4tU59cGth+N1c=;
        b=XWog8K2XGNd5F+OTQ1A45iirwYeVbJGxDnvZSDey9Ru47r9/YGooHd+22UogeCdamU
         U++LZtoOJTtcZGIHLlKDIEJx4NXMjjXooHuCQKFRUrNPVZ4ntxBqdjh2rGWM8alz5ij7
         qjCnv5gEnq/1rKwEVyitYQYNzE8SjVZJgIiXJDMd9EZE5KpeW6q5JathulVf8kVrWNV4
         MxGhD+xslIbJyXrFqUYm8bFRyyh2i6E4iSBPAY0dN/WBZwpGmVObhi4LIvqhOOGilA1O
         kSCY7YdcI3D7EEP1MPvT0A6T4ZoS3C1LlUjcKCMfbfjd9Aar3PdNKqCrA4c6oL4mB/5m
         Y7pg==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
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
         :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=MqeJ2P5N+mBEELapS9SIrVXDqKBUsl4tU59cGth+N1c=;
        b=NA1RVC1VIt0muFtswZpAf+ZiazLK/fz9gNwA7BVuxlAR894b25IXx2KdMC0UtYDLbc
         lT2vh7eAFVoajzbw51YVlOs5VUsp8D7F15azV5sg1IlGToJgGQdoMIEsK7px7l2Oe05w
         SAc/aXpl3ehRoRd2Cp6NDKHWOxwKu029ueNmArN/5dW0F0ygmjF/R72LoM1bFu3Z2yw9
         JT8r6mYZktAjrVrhOMrhdAJkt8TVh0/OHPpXnNxK3y+pa+s33FRdwHRfPLf59jl0TIAv
         f6hYg99ami3FEH5odETv4LrTK6ddE2j1GMiBWF1dyjMIR8hnnkjqPs2sQWAL/cpIAcUd
         MeXg==
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: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=MqeJ2P5N+mBEELapS9SIrVXDqKBUsl4tU59cGth+N1c=;
        b=YFeb7RVBpICfGa4l0b8n0g5pXK7I4HO9ztlAlwoyk39dmZt1wt3A4MwPJQJhtH5/iy
         68Gk0rqU9UpjCJJo4qyzzds01mVEP3SVw2nL5a7jcsM3R7Zk2AhjlT6WCP2PszDj8Oc7
         I3ibTF7BAJUOKPtWPsrqjpP3DKeTI/i96JSStI/iR/iZlB9yE7GlsoT3b8GZGVwqenna
         IaFN9vGnzQ/SUNyY1U5pcvmuUhxpyhZgyVHaKMqJTuviRnoZxP0AMeEYBOYLvDwKYKeK
         vYSFG2nbjJfrYDklyHxzu5ksp/yVWYJ9cH2gGiShs4cE6c6S80caZO8wYYHypTVJtGzy
         5Suw==
X-Gm-Message-State: AJaThX75RhVhcrGN969S+qZn/aIRXcEY8MrQohqiLJdi88PcxSZeWYko
	mthK5wpz5I/SOJxAvqHZVOzIPA==
X-Google-Smtp-Source: AGs4zMbrG+xm5xhsSYjQDS2v0InKgOn/dt8j8XCghZu/MulkyWBBKdNYuFUhlT+mpQktTl+OG7n40Q==
X-Received: by 10.28.96.214 with SMTP id u205mr1220135wmb.21.1511118997875;
        Sun, 19 Nov 2017 11:16:37 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.223.168.1 with SMTP id l1ls2018608wrc.5.gmail; Sun, 19 Nov
 2017 11:16:36 -0800 (PST)
X-Received: by 10.28.210.129 with SMTP id j123mr8740311wmg.52.1511118996605;
        Sun, 19 Nov 2017 11:16:36 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1511118996; cv=none;
        d=google.com; s=arc-20160816;
        b=YlH/W/5y6JhQlUz98A3+CO0cg/pdBJSIPc81d4at8yn9cfcC9X1j4450MAsWAqMhAT
         qmZ+VibnDF7LoV252z8EzlBGsF4igYJ5qzrAcMu+NYFxxqm+40fnjdqSKxTZ25Ga9Miy
         yWdcfbCPHFufi5cWHAKUHMbX5Xjj/9M+rIePDG4SAY+No0WMfF+G0VDWuB4DRmwzyuT6
         cMBrgnGkMah2+tN7pcWjJTLuHdRyvLx1U0wjH4D/CzYGXC9PmPcrtfENwsN75qJp6niX
         nBFMyzEWKDmwua4T4oQazrgzGiFYhAOWHQM3qGIEy3Brzcnf2PFQduHgA7W/DLCD7w+y
         9u+w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=BnrzLr4om0u7TJPmUnDPjPltdd4tUD6lOnJkI2dkJ0I=;
        b=DpIV94PvUy9Pj/aotQojz89/88RyUiCLjL39GUO/pvRG2o4TyDuoExb2KaHe9l+rpt
         IUc4YMW+Q1r+UbZe5YwGYj6BIfDJPTd8i+N79Bpc/UNkiEdG8M+be/f0dXVU/UkNUO+c
         75J6548Cm3SLk0g0IWg5YkjCDDSMgFIobN8HBvzEXgzF7ZDJNw/SnoeT6No3667zQHnc
         2VdG2D/ol4U3v75Nm9r6sw53Y3e6ccd1N4F0l903eaJWN2yxUWE2lgr051pL6l0dZGck
         wPt2oUGb5oQSBUf4rPfldxcPIAYI6Rz9tO70cX1Xgb2YMmAa7s/nnOf+Ya8pRVC1oXjp
         hZ1Q==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id v203si6348722wmv.252.2017.11.19.11.16.36
        for <std-proposals@isocpp.org>;
        Sun, 19 Nov 2017 11:16:36 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:e0ee:4594:419f:8f32])
	by gondolin.macieira.info (Postfix) with ESMTPSA id DA5BF11B99E
	for <std-proposals@isocpp.org>; Sun, 19 Nov 2017 11:16:35 -0800 (PST)
In-Reply-To: <25d0417e-8fa0-47ee-a70b-3ce7b10c1fee@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 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:35405
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35405>

On sexta-feira, 17 de novembro de 2017 20:25:44 PST Nicol Bolas wrote:
> On Friday, November 17, 2017 at 6:39:33 PM UTC-5, Thiago Macieira wrote:
> > typeid() must return a reference to an object whose address can be
> > compared
> > across translation units.
> 
> Is that really something we need to require from implementations? Isn't
> having them compare equal good enough? And I'm not just talking about
> freestanding here.

You're right, comparing pointer addresses is not a guarantee. There needs to 
be a way to compare them and std::type_info does have operator==. How that's 
implemented is ABI-specific.

Both libstdc++ (libsupc++) and libc++ (libc++abi) do a pointer comparison of 
the typeinfo name but also have a fallback to doing a string comparison. The 
#define that disables that string comparison appears not to be used (anymore), 
probably shown by this comment in libstdc++'s <typeinfo>:

//  We used to do inline pointer comparison by default if weak symbols
// are available, but even with weak symbols sometimes names are not merged
// when objects are loaded with RTLD_LOCAL, so now we always use strcmp by
// default.

So, in fact, in a freestanding implementation, this could be allowed again, 
since there would be no dynamic module loading. There would still be a minor 
ABI change to emit the TI objects for primitives, but that's something easily 
within reach of the compiler developers.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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/1747398.ysixVUWvEu%40tjmaciei-mobl1.

.
