220 36729 <7ce99930-b0b8-41cc-b3ea-7501e265bb62@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Static analysis and the future of C++
Date: Sun, 21 Jan 2018 05:44:07 -0800 (PST)
Lines: 464
Approved: news@gmane.org
Message-ID: <7ce99930-b0b8-41cc-b3ea-7501e265bb62@isocpp.org>
References: <0087c1a4-0b36-40ca-8d43-5bfaf0af62ca@isocpp.org>
 <a395ffbf-fc53-4288-b1ca-f559e1703eac@isocpp.org>
 <88864914-82a8-4a8b-bda7-cffd38379edf@isocpp.org>
 <4fa792ec-1f51-4357-a65a-2ce3c10c60c0@isocpp.org>
 <634a78e7-dc92-4f5e-9105-83339a18b579@isocpp.org>
 <73c5d690-f05d-4e72-a685-3c55d8be0f8e@isocpp.org>
 <f8d52182-5aef-476b-b0bb-047843c17e2a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1851_18905626.1516542247800"
X-Trace: blaine.gmane.org 1516542135 26189 195.159.176.226 (21 Jan 2018 13:42:15 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 21 Jan 2018 13:42:15 +0000 (UTC)
Cc: mihailnajdenov@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRBKNSSLJQKGQEF4DHRDY@isocpp.org Sun Jan 21 14:42:10 2018
Return-path: <std-proposals+bncBCUJ3A7GRAPRBKNSSLJQKGQEF4DHRDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f197.google.com ([209.85.217.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRBKNSSLJQKGQEF4DHRDY@isocpp.org>)
	id 1edFss-0006HU-DG
	for gclcip-std-proposals@m.gmane.org; Sun, 21 Jan 2018 14:42:06 +0100
Original-Received: by mail-ua0-f197.google.com with SMTP id q28sf4763011uaa.6
        for <gclcip-std-proposals@m.gmane.org>; Sun, 21 Jan 2018 05:44:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=ziqz/zlwL0qXNn7NtdjF0RZ+VVu84cLwnL3fwK8I4us=;
        b=iGG5EX0RtzBL72VGye/Jphg6hYyFL218S7qXYbs/A6gzkPcZV1YDnTnd5vdVrUcLng
         9YU+35sobnFg50ksBiWigi4wF7c3ZI9x4JCsv3doujg+7Jqa23GATr/CP6zkLdOoiVbN
         lJAQ33vE2aCTNP+O+SVd/YWfXP0wvHfmjAC7nYyl8Qw89P1rnfeq01jMZH4zsSqPG4uI
         VWJLNtZrBueLKj4LH5G2jljGTI9do5kyDjeQzRR7/tHkclXDVFdUpTSkC8I6oTBOUwh9
         KOR+hmjnoopf3A4heBCExzVbxhS6ggL4JdxmpAKiDTavbI4vDdM0WqQDmHuoJS0UvxCf
         //bQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=ziqz/zlwL0qXNn7NtdjF0RZ+VVu84cLwnL3fwK8I4us=;
        b=vJcvnOuJmJn4u0SvA88rNM/9D00wVoMhKyTr1EvNpoek7dKxa9lpxOoH4rcDJXQABm
         qnSbOub4m974dMMaf+JjdKWQNDLo6y//IF/10O0JK83JMrQrXDyGhrpst24EDpjrvB5M
         QkV03W2/4cu5DcnYFMT0N19ir4GayyekXconffbn2HP02vWzhkJvCKQKJS9fPHRuxIaP
         xXBnM/1Ng7hnLy+drKLVKdwN4O7M0S4ex8gkNwAo2wM1wsxchDPc0EqnGbeRdamCspCy
         08tWCo5O6B/Hrrbfn7yuJxQLlzDpuF4UPFADtmVwuNC4rG4zeGs/4ln9VFKfd3+8zyxI
         qfBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=ziqz/zlwL0qXNn7NtdjF0RZ+VVu84cLwnL3fwK8I4us=;
        b=tmqLQDDNbrmTXRNeJvMgGHvOZsPMiCRHT004PZR5uvYdIi1R3RO928HVJwqK7Y3yWy
         WznkS6gSBLUVAeuNmIEWYsaca60p8U9ffJtPw7hR8DAvOyHChtzFL1uzbZ/AJqYCY0BF
         ASwcpbVi6QmmY5US5K7zkc+eMBgc2pVUr3VdkD+V91KC6z/iutfyCTe/HGnRBtRaMdrk
         lrQZiffMGLx85VzDSfBzLSMd/YsGU8RJGbpsW4UUWNw3XM8cBNaWxZj2nzyDiRkl/5lR
         s8PtiNnftaHCvRTEXmULd8k+q7C1Wtb3TAr8Amz2TncSO9I6h5uKNjPiPrLrajCRDVlt
         FC9A==
X-Gm-Message-State: AKwxytcS/lOGCRe6seG13qixhQuUjvmAswgeqCwQDhJbPo4x+LXD4gmH
	XdHGhaO+p/r4D2Sn3THkLhtzHQ==
X-Google-Smtp-Source: AH8x225Osaw9wqRKWSc+Ekt52rbbH6vdRzAVCE49+MSNMG3uJwWA/WZOlNOKSiDuIHeDfNMsUD8xow==
X-Received: by 10.31.110.71 with SMTP id j68mr2226269vkc.102.1516542250515;
        Sun, 21 Jan 2018 05:44:10 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.16.69 with SMTP id g5ls1826976uab.3.gmail; Sun, 21 Jan
 2018 05:44:08 -0800 (PST)
X-Received: by 10.31.161.69 with SMTP id k66mr472912vke.10.1516542248465;
        Sun, 21 Jan 2018 05:44:08 -0800 (PST)
In-Reply-To: <f8d52182-5aef-476b-b0bb-047843c17e2a@isocpp.org>
X-Original-Sender: MihailNajdenov@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:36729
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36729>

------=_Part_1851_18905626.1516542247800
Content-Type: multipart/alternative; 
	boundary="----=_Part_1852_382242868.1516542247801"

------=_Part_1852_382242868.1516542247801
Content-Type: text/plain; charset="UTF-8"



On Sunday, January 21, 2018 at 3:45:37 AM UTC+2, Nicol Bolas wrote:
>
> On Saturday, January 20, 2018 at 3:25:14 PM UTC-5, mihailn...@gmail.com 
> wrote:
>>
>> On Saturday, January 20, 2018 at 9:31:22 PM UTC+2, Nicol Bolas wrote:
>>>
>>> ...
>>>>
>>>>
>>> How would it know? If all the compiler in that translation unit sees is:
>>>
>>> class A_view
>>> {
>>> public:
>>>   A_view(const A &p);
>>>
>>> private:
>>>   observer_ptr<A> p_;
>>> };
>>>
>>> How could the compiler* possibly* know that this code is invalid:
>>>
>>> A_view v(A{});
>>>
>>> We're not talking about runtime detection here; this is purely 
>>> compile-time. And the compiler doesn't necessarily see everything. If 
>>> `A_view` is in another translation unit that isn't visible to static 
>>> analysis, this doesn't work.
>>>
>>
>> You have to be more specific, might be my knowledge failing me, but what 
>> would prevent the compiler seeing in the case when are the dtros of both 
>> variables called? 
>>
>
> In order for the compiler to be able to associate the prvalue temporary 
> with `A_view`, it must be able to look at the code and see that `A_view` 
> contains a pointer/reference to that temporary. While the compiler can see 
> that `A_view`'s constructor is being given a pointer to a temporary, it 
> does not know what that constructor is doing. It cannot associate the 
> constructor parameter with `A_view::p_`, because there is no code in this 
> translation unit that associates the constructor parameter with that member 
> variable.
>
> Yes, the compiler can see that two destructors are happening. But there is 
> no evident association between these two objects. And without that 
> knowledge, the compiler has no right to declare that this code is 
> problematic.
>
> This is why you need the annotation to be part of the declaration. Because 
> the declaration may be the only thing the compiler will ever see.
>


I see, you mean that only the A_view ctor is visible as a single function 
call and nothing beyond that.

If that is the case, then both view (its ctor) and observer_ptr must be 
inlined. Luckily, that covers practically all views and observer_ptr is a 
template already. 
Surely it would be a noticeable limitation, but will not make the feature 
useless. 



However, that does not have to be the case. I was assuming some sort of 
"entire program" analysis.

In that case the analyzer sees observer_ptr as part of the A_view 
declaration in the header, then it sees the decorated constructor of observer_ptr, 

after that it goes and "recompiles" the A_view object file to see how the 
association is made.

As I said, I was assuming "entire program" analysis, because otherwise 
*copies* of views would be impossible to implement.

Not just copies, but code like this

void f(observer_ptr<P> pv)
{
  kill_p_by_accident(); //< some function using p, not in the TU

 // warn of using pv after potential kill
}


The quotes in "entire program" are important. The whole point of 
decorations is to have *targeted *analysis - real "entire program" analysis are 
too slow and too noisy.

If the analyzer have all the source, to all the translation units, *and* 
knows what to look for, then it *should* be able to do reasonably fast and 
reasonably accurate predictions.



I am not insisting of "entire program", though, just speculating what would 
be possible and useful!

I would be happy with *anything, *any scaled back version of this (or 
something similar), because now, out of the box, we have *nothing**.*
And what we have, the external tools, have to do a ton of guess work simply 
because C++ deliberately ignores their existence.

 
 

-- 
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/7ce99930-b0b8-41cc-b3ea-7501e265bb62%40isocpp.org.

------=_Part_1852_382242868.1516542247801
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Sunday, January 21, 2018 at 3:45:37 AM UTC+2, N=
icol Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr">On Saturday, January 20, 2018 at 3:25:14 PM UTC-5, <a>mihailn...@gmail.=
com</a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-le=
ft:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">On S=
aturday, January 20, 2018 at 9:31:22 PM UTC+2, Nicol Bolas wrote:<blockquot=
e class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px=
 #ccc solid;padding-left:1ex"><div dir=3D"ltr">...<blockquote class=3D"gmai=
l_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr"><div></div></div></blockquote><div><br></di=
v><div>How would it know? If all the compiler in that translation unit sees=
 is:</div><div><br></div><div style=3D"border:1px solid rgb(187,187,187);wo=
rd-wrap:break-word;background-color:rgb(250,250,250)"><code><div><span styl=
e=3D"color:#008">class</span><span style=3D"color:#000"> A_view<br></span><=
span style=3D"color:#660">{</span><span style=3D"color:#000"><br></span><sp=
an style=3D"color:#008">public</span><span style=3D"color:#660">:</span><sp=
an style=3D"color:#000"><br>=C2=A0 A_view</span><span style=3D"color:#660">=
(</span><span style=3D"color:#008">const</span><span style=3D"color:#000"> =
A </span><span style=3D"color:#660">&amp;</span><span style=3D"color:#000">=
p</span><span style=3D"color:#660">);</span><span style=3D"color:#000"><br>=
<br></span><span style=3D"color:#008">private</span><span style=3D"color:#6=
60">:</span><span style=3D"color:#000"><br>=C2=A0 observer_ptr</span><span =
style=3D"color:#660">&lt;</span><span style=3D"color:#000">A</span><span st=
yle=3D"color:#660">&gt;</span><span style=3D"color:#000"> p_</span><span st=
yle=3D"color:#660">;</span><span style=3D"color:#000"><br></span><span styl=
e=3D"color:#660">};</span></div></code></div><div><br></div><div>How could =
the compiler<i> possibly</i> know that this code is invalid:</div><div><br>=
</div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;=
background-color:rgb(250,250,250)"><code><div><span style=3D"color:#000">A_=
view v</span><span style=3D"color:#660">(</span><span style=3D"color:#000">=
A</span><span style=3D"color:#660">{});</span><span style=3D"color:#000"><b=
r></span></div></code></div><br><div>We&#39;re not talking about runtime de=
tection here; this is purely compile-time. And the compiler doesn&#39;t nec=
essarily see everything. If `A_view` is in another translation unit that is=
n&#39;t visible to static analysis, this doesn&#39;t work.</div></div></blo=
ckquote><div><br></div><div style=3D"text-align:left">You have to be more s=
pecific, might be my knowledge failing me, but what would prevent the compi=
ler seeing in the case when are the dtros of both variables called?=C2=A0</=
div></div></blockquote><div><br></div><div>In order for the compiler to be =
able to associate the prvalue temporary with `A_view`, it must be able to l=
ook at the code and see that `A_view` contains a pointer/reference to that =
temporary. While the compiler can see that `A_view`&#39;s constructor is be=
ing given a pointer to a temporary, it does not know what that constructor =
is doing. It cannot associate the constructor parameter with `A_view::p_`, =
because there is no code in this translation unit that associates the const=
ructor parameter with that member variable.</div><div><br></div><div>Yes, t=
he compiler can see that two destructors are happening. But there is no evi=
dent association between these two objects. And without that knowledge, the=
 compiler has no right to declare that this code is problematic.</div><div>=
<br></div><div>This is why you need the annotation to be part of the declar=
ation. Because the declaration may be the only thing the compiler will ever=
 see.</div></div></blockquote><div><br></div><div><br></div><div>I see, you=
 mean that only the A_view ctor is visible as a single function call and no=
thing beyond that.</div><div><br></div><div>If that is the case, then both =
view (its ctor) and observer_ptr must be inlined. Luckily, that covers prac=
tically all views and observer_ptr is a template already. </div><div>Surely=
 it would be a noticeable limitation, but will not make the feature useless=
..=C2=A0</div><div><br></div><div><br></div><div><br></div><div>However, tha=
t does not have to be the case. I was assuming some sort of &quot;entire pr=
ogram&quot; analysis.</div><div><font face=3D"courier new"><br></font></div=
><div>In that case the analyzer sees observer_ptr as part of the A_view dec=
laration in the header, then it sees the decorated constructor of <span sty=
le=3D"display: inline !important; float: none; background-color: transparen=
t; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&q=
uot;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal;=
 font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; te=
xt-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-s=
troke-width: 0px; white-space: normal; word-spacing: 0px;">observer_ptr, </=
span></div><div><span style=3D"display: inline !important; float: none; bac=
kground-color: transparent; color: rgb(34, 34, 34); font-family: &quot;Aria=
l&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: norm=
al; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans=
: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transf=
orm: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacin=
g: 0px;">after that it goes and &quot;recompiles&quot; the A_view object fi=
le to see how the association is made.</span></div><div><b><br></b></div><d=
iv><span style=3D"display: inline !important; float: none; background-color=
: transparent; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot=
;Helvetica&quot;,sans-serif; font-size: 13px; font-style: normal; font-vari=
ant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-ali=
gn: left; text-decoration: none; text-indent: 0px; text-transform: none; -w=
ebkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">As I=
 said, I was assuming &quot;entire program&quot; analysis, because otherwis=
e</span><font face=3D"arial,sans-serif"> <i>copies</i> of views would be im=
possible to implement.</font></div><div><div style=3D"background-color: tra=
nsparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; =
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stre=
tch; border-image-slice: 100%; border-image-source: none; border-image-widt=
h: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-l=
eft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: no=
ne; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-=
style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &a=
mp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size=
: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-=
spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; m=
argin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding=
-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; tex=
t-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-=
space: normal; word-spacing: 0px;"><br></div><div style=3D"background-color=
: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: n=
one; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat:=
 stretch; border-image-slice: 100%; border-image-source: none; border-image=
-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; bor=
der-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-styl=
e: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border=
-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-famil=
y: &amp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font=
-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; le=
tter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0=
px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; pa=
dding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none=
; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; w=
hite-space: normal; word-spacing: 0px;">Not just copies, but code like this=
</div><div style=3D"background-color: transparent; border-bottom-color: rgb=
(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-i=
mage-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bor=
der-image-source: none; border-image-width: 1; border-left-color: rgb(34, 3=
4, 34); border-left-style: none; border-left-width: 0px; border-right-color=
: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; borde=
r-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px=
; color: rgb(34, 34, 34); font-family: &amp;quot;Arial&amp;quot;,&amp;quot;=
Helvetica&amp;quot;,sans-serif; font-size: 13px; font-style: normal; font-v=
ariant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0p=
x; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; paddin=
g-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; tex=
t-align: left; text-decoration: none; text-indent: 0px; text-transform: non=
e; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"=
><br></div><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34,=
 34); border-image: none; text-align: left; color: rgb(34, 34, 34); text-tr=
ansform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; f=
ont-variant: normal; word-spacing: 0px; white-space: normal; orphans: 2; -w=
ebkit-text-stroke-width: 0px; background-color: transparent;"><div style=3D=
"background-color: transparent; border-bottom-color: rgb(34, 34, 34); borde=
r-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bor=
der-image-repeat: stretch; border-image-slice: 100%; border-image-source: n=
one; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left=
-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); =
border-right-style: none; border-right-width: 0px; border-top-color: rgb(34=
, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34=
, 34); font-family: &amp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;=
,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; fon=
t-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px=
; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padd=
ing-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text=
-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-str=
oke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"cour=
ier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bo=
ttom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-=
image-repeat: stretch; border-image-slice: 100%; border-image-source: none;=
 border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-sty=
le: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bord=
er-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34=
, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; m=
argin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; p=
adding-left: 0px; padding-right: 0px; padding-top: 0px;">void f(observer_pt=
r&lt;P&gt; pv)</font></div><div style=3D"background-color: transparent; bor=
der-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom=
-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-i=
mage-slice: 100%; border-image-source: none; border-image-width: 1; border-=
left-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0p=
x; border-right-color: rgb(34, 34, 34); border-right-style: none; border-ri=
ght-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; =
border-top-width: 0px; color: rgb(34, 34, 34); font-family: &amp;quot;Arial=
&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 13px; font-=
style: normal; font-variant: normal; font-weight: 400; letter-spacing: norm=
al; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0p=
x; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; =
padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px=
; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal=
; word-spacing: 0px;"><font face=3D"courier new,monospace" style=3D"border-=
bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wid=
th: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image=
-slice: 100%; border-image-source: none; border-image-width: 1; border-left=
-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; b=
order-right-color: rgb(34, 34, 34); border-right-style: none; border-right-=
width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bord=
er-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
 margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0p=
x; padding-top: 0px;">{</font></div><div style=3D"background-color: transpa=
rent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bord=
er-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch;=
 border-image-slice: 100%; border-image-source: none; border-image-width: 1=
; border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-=
width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; =
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-styl=
e: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &amp;q=
uot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 13=
px; font-style: normal; font-variant: normal; font-weight: 400; letter-spac=
ing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margi=
n-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-rig=
ht: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-in=
dent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spac=
e: normal; word-spacing: 0px;"><font face=3D"courier new,monospace" style=
=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border=
-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; b=
order-image-slice: 100%; border-image-source: none; border-image-width: 1; =
border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-wi=
dth: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; bo=
rder-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style:=
 none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-=
right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; paddin=
g-right: 0px; padding-top: 0px;">=C2=A0 kill_p_by_accident(); //&lt; some f=
unction using p, not in the TU</font></div><div style=3D"background-color: =
transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: non=
e; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: s=
tretch; border-image-slice: 100%; border-image-source: none; border-image-w=
idth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; borde=
r-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style:=
 none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-t=
op-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family:=
 &amp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-s=
ize: 13px; font-style: normal; font-variant: normal; font-weight: 400; lett=
er-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px=
; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padd=
ing-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; =
text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; whi=
te-space: normal; word-spacing: 0px;"><font face=3D"courier new,monospace" =
style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; b=
order-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stret=
ch; border-image-slice: 100%; border-image-source: none; border-image-width=
: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-le=
ft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: non=
e; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-s=
tyle: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; ma=
rgin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; p=
adding-right: 0px; padding-top: 0px;"><br style=3D"border-bottom-color: rgb=
(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-i=
mage-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bor=
der-image-source: none; border-image-width: 1; border-left-color: rgb(34, 3=
4, 34); border-left-style: none; border-left-width: 0px; border-right-color=
: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; borde=
r-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px=
; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;=
 padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0=
px;"></font></div><div style=3D"background-color: transparent; border-botto=
m-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0=
px; border-image-outset: 0; border-image-repeat: stretch; border-image-slic=
e: 100%; border-image-source: none; border-image-width: 1; border-left-colo=
r: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; border=
-right-color: rgb(34, 34, 34); border-right-style: none; border-right-width=
: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-to=
p-width: 0px; color: rgb(34, 34, 34); font-family: &amp;quot;Arial&amp;quot=
;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 13px; font-style: no=
rmal; font-variant: normal; font-weight: 400; letter-spacing: normal; margi=
n-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphan=
s: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-t=
op: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-tr=
ansform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-sp=
acing: 0px;"><font face=3D"courier new,monospace" style=3D"border-bottom-co=
lor: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; =
border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 1=
00%; border-image-source: none; border-image-width: 1; border-left-color: r=
gb(34, 34, 34); border-left-style: none; border-left-width: 0px; border-rig=
ht-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0p=
x; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-wi=
dth: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-t=
op: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddin=
g-top: 0px;">=C2=A0// warn of using pv after potential kill</font></div><di=
v style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, =
34); border-bottom-style: none; border-bottom-width: 0px; border-image-outs=
et: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image=
-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); b=
order-left-style: none; border-left-width: 0px; border-right-color: rgb(34,=
 34, 34); border-right-style: none; border-right-width: 0px; border-top-col=
or: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: =
rgb(34, 34, 34); font-family: &amp;quot;Arial&amp;quot;,&amp;quot;Helvetica=
&amp;quot;,sans-serif; font-size: 13px; font-style: normal; font-variant: n=
ormal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin=
-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom:=
 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: =
left; text-decoration: none; text-indent: 0px; text-transform: none; -webki=
t-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font fa=
ce=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34);=
 border-bottom-style: none; border-bottom-width: 0px; border-image-outset: =
0; border-image-repeat: stretch; border-image-slice: 100%; border-image-sou=
rce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); borde=
r-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34,=
 34); border-right-style: none; border-right-width: 0px; border-top-color: =
rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bott=
om: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bott=
om: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</font>=
</div><b></b></div></div><div><font face=3D"arial,sans-serif"><b><i><br></i=
></b></font></div><div><b><i><br></i></b></div><div>The quotes in &quot;ent=
ire program&quot; are important. The whole point of decorations is to have =
<i>targeted </i>analysis - real &quot;entire program&quot; <span style=3D"d=
isplay: inline !important; float: none; background-color: transparent; colo=
r: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sa=
ns-serif; font-size: 13px; font-style: normal; font-variant: normal; font-w=
eight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-deco=
ration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-w=
idth: 0px; white-space: normal; word-spacing: 0px;">analysis</span><span st=
yle=3D"display: inline !important; float: none; background-color: transpare=
nt; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&=
quot;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal=
; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; t=
ext-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-=
stroke-width: 0px; white-space: normal; word-spacing: 0px;"> </span>are too=
 slow and too noisy.</div><div><br></div><div>If the analyzer have all the =
source, to all the translation units, <i>and</i> knows what to look for, th=
en it <i>should</i> be able to do reasonably fast and reasonably accurate p=
redictions.</div><div><br></div><div><br></div><div><br></div><div>I am not=
 insisting of &quot;entire program&quot;, though, just speculating what wou=
ld be possible and useful!</div><div><br></div><div> I would be happy with =
<i>anything, </i>any scaled back version of this (or something similar), be=
cause now, <span style=3D"display: inline !important; float: none; backgrou=
nd-color: transparent; color: rgb(34, 34, 34); font-family: &quot;Arial&quo=
t;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: normal; f=
ont-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; =
text-align: left; text-decoration: none; text-indent: 0px; text-transform: =
none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0p=
x;">out of the box, </span>we have <i>nothing</i><i>.</i></div><div>And wha=
t we have, the external tools, have to do a ton of guess work simply becaus=
e C++ deliberately ignores their existence.</div><div><i><br></i></div><div=
>=C2=A0</div><div>=C2=A0</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/7ce99930-b0b8-41cc-b3ea-7501e265bb62%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7ce99930-b0b8-41cc-b3ea-7501e265bb62=
%40isocpp.org</a>.<br />

------=_Part_1852_382242868.1516542247801--

------=_Part_1851_18905626.1516542247800--

.
