220 19372 <b5b53a38-ff8b-4a9d-be6a-3d615433b349@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Erich Keane <erich.keane@verizon.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Testing for supported features: Per-feature
 macros? Sentinel compilation?
Date: Tue, 28 Jul 2015 11:09:54 -0700 (PDT)
Lines: 173
Approved: news@gmane.org
Message-ID: <b5b53a38-ff8b-4a9d-be6a-3d615433b349@isocpp.org>
References: <e5919c40-d35e-4309-b5b8-6525a4eb443c@isocpp.org> <53281455.oCxcCYIyeX@tjmaciei-mobl4> <726831ee-89c5-4bc5-96cc-6d5855843a03@isocpp.org>
 <4632341.dbW0eupDvr@tjmaciei-mobl4>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_161_337512148.1438106994243"
X-Trace: ger.gmane.org 1438107009 20161 80.91.229.3 (28 Jul 2015 18:10:09 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 28 Jul 2015 18:10:09 +0000 (UTC)
Cc: isocppgroup@denisbider.com, thiago@macieira.org
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCWZXNPJO4IPHCW7VUCRUBE22SBTE@isocpp.org Tue Jul 28 20:09:57 2015
Return-path: <std-proposals+bncBCWZXNPJO4IPHCW7VUCRUBE22SBTE@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCWZXNPJO4IPHCW7VUCRUBE22SBTE@isocpp.org>)
	id 1ZK9K9-0002cd-3W
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Jul 2015 20:09:57 +0200
Original-Received: by oiax136 with SMTP id x136sf258955387oia.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Jul 2015 11:09:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:content-type: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=C/3VJI0O0sPdhsVB5pHWd1PJYZM+cTPsjcsiRcMedjU=;
        b=K0Qvk1//bGqkhw+V7Mjpwpg+ReAdsMtiZEGDG4V52IFOYRrQY7tq5P9UXXzJemZlJE
         t8z8Epi52RlamhVSCnY3eq8dfl3eEmpYzohLuxsxNSC7PN3n4hH6eM4FeX1GQvb636sy
         xjTohCuTyKwzlMWus7uFSINgYTp7oWX45tFGkzGlqSuE3FbnFlgCdkiRDk2YV2h9IoKM
         p07HbyMhBKWi9N/wvGCZWpdZ/dhn6QrwlEnv8jV7LbKA0lszFBT28XoJgbA54/ojvOLC
         kOPOAlIQl5c8udtvSljJWdffODnJqTg2dDLNtlpkKbMJPkBVFbJ7RO0SnP7JNfB9RxsQ
         bYOA==
X-Gm-Message-State: ALoCoQl4yEnc8OAwp/5F6aTw9fHfaNbIPrPQD/8c9cA5+icoqxDBeA25nM/NdBp8hsMj0+Q1wZ4F
X-Received: by 10.50.8.1 with SMTP id n1mr4990962iga.1.1438106996154;
        Tue, 28 Jul 2015 11:09:56 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.50.208 with SMTP id e16ls1362213igo.4.gmail; Tue, 28 Jul
 2015 11:09:55 -0700 (PDT)
X-Received: by 10.50.36.6 with SMTP id m6mr86150igj.15.1438106995580;
        Tue, 28 Jul 2015 11:09:55 -0700 (PDT)
In-Reply-To: <4632341.dbW0eupDvr@tjmaciei-mobl4>
X-Original-Sender: erich.keane@verizon.net
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19372
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19372>

------=_Part_161_337512148.1438106994243
Content-Type: multipart/alternative; 
	boundary="----=_Part_162_1193958586.1438106994243"

------=_Part_162_1193958586.1438106994243
Content-Type: text/plain; charset=UTF-8

On Monday, July 27, 2015 at 4:09:18 PM UTC-7, Thiago Macieira wrote:
>
> On Monday 27 July 2015 15:24:59 denis bider wrote: 
> > Indeed; the compiler would then be expected to behave as if it launched 
> a 
> > child process of itself to compile that code, and report back on any 
> > errors. If a compiler is well-architected - does not rely on global 
> objects 
> > and such to store state - it should be possible to do this without 
> > launching a separate process. 
> > 
> > I guess, if you are saying this is hard, you're saying many compilers 
> are 
> > poorly implemented? Use global state such that they can't create another 
> > instance of the compiler in-process? 
>
> "Poorly implemented" is a subjective quality assessment, unless you make 
> the 
> objective measurement of whether it does what it set out to do. Since 
> those 
> compilers are working and are getting modified rapidly by their developer 
> teams 
> to add features, we cannot honestly say that any of them is poorly 
> implemented, however we may feel about their architecture. 
>
> Some architectures may be welcoming of some new changes and some others 
> wouldn't. And if the committee approves a certain feature, the developers 
> will 
> have to implement the functionality. 
>
> I was just warning that there might be quite a lot of resistance from the 
> compiler writers, given the architectural issues I mentioned, plus: 
>  - there's already a solution for some of the use-cases presented, 
> including 
>   foremost the one you presented 
>  - it does not go far enough to the very common case of linking a test 
> program 
>    to see if a function does exist in a library or the not-as-common case 
> of 
>    running a test program to see how it behaves. 
>
> -- 
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org 
>    Software Architect - Intel Open Source Technology Center 
>       PGP/GPG: 0x6EF45358; fingerprint: 
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358 
>
>
My concern is that we couldn't trust the compiler makers to properly set 
these macros EVEN IF they were making their best effort.  By definition, 
they won't likely know if a feature is sufficiently bug free until it has 
spent some time accruing bug reports.

I believe the 'best' solution would be to have a community maintained 
include file to do this based on versions that everyone could pull into 
their projects.  A simple github file with these definitions based on the 
major compilers, as long as it is sufficiently maintained, would do a lot 
better than trusting that the compiler manufacturers release bug-free and 
tag appropriately.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_162_1193958586.1438106994243
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Monday, July 27, 2015 at 4:09:18 PM UTC-7, Thiago Macieira wrote:<blockq=
uote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-lef=
t: 1px #ccc solid;padding-left: 1ex;">On Monday 27 July 2015 15:24:59 denis=
 bider wrote:
<br>&gt; Indeed; the compiler would then be expected to behave as if it lau=
nched a
<br>&gt; child process of itself to compile that code, and report back on a=
ny
<br>&gt; errors. If a compiler is well-architected - does not rely on globa=
l objects
<br>&gt; and such to store state - it should be possible to do this without
<br>&gt; launching a separate process.
<br>&gt;=20
<br>&gt; I guess, if you are saying this is hard, you&#39;re saying many co=
mpilers are
<br>&gt; poorly implemented? Use global state such that they can&#39;t crea=
te another
<br>&gt; instance of the compiler in-process?
<br>
<br>&quot;Poorly implemented&quot; is a subjective quality assessment, unle=
ss you make the=20
<br>objective measurement of whether it does what it set out to do. Since t=
hose=20
<br>compilers are working and are getting modified rapidly by their develop=
er teams=20
<br>to add features, we cannot honestly say that any of them is poorly=20
<br>implemented, however we may feel about their architecture.
<br>
<br>Some architectures may be welcoming of some new changes and some others=
=20
<br>wouldn&#39;t. And if the committee approves a certain feature, the deve=
lopers will=20
<br>have to implement the functionality.
<br>
<br>I was just warning that there might be quite a lot of resistance from t=
he=20
<br>compiler writers, given the architectural issues I mentioned, plus:
<br>=C2=A0- there&#39;s already a solution for some of the use-cases presen=
ted, including=20
<br>=C2=A0 foremost the one you presented
<br>=C2=A0- it does not go far enough to the very common case of linking a =
test program=20
<br>=C2=A0 =C2=A0to see if a function does exist in a library or the not-as=
-common case of
<br>=C2=A0 =C2=A0running a test program to see how it behaves.
<br>
<br>--=20
<br>Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=
=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.goo=
gle.com/url?q\75http%3A%2F%2Fmacieira.info\46sa\75D\46sntz\0751\46usg\75AFQ=
jCNEswDUBNCNanbu7euhqLn_62FW8ag&#39;;return true;" onclick=3D"this.href=3D&=
#39;http://www.google.com/url?q\75http%3A%2F%2Fmacieira.info\46sa\75D\46snt=
z\0751\46usg\75AFQjCNEswDUBNCNanbu7euhqLn_62FW8ag&#39;;return true;">maciei=
ra.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"_blank" rel=
=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\7=
5http%3A%2F%2Fkde.org\46sa\75D\46sntz\0751\46usg\75AFQjCNHGRJdo5_JYG1Dowztw=
AHAKs80XSA&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.google=
..com/url?q\75http%3A%2F%2Fkde.org\46sa\75D\46sntz\0751\46usg\75AFQjCNHGRJdo=
5_JYG1DowztwAHAKs80XSA&#39;;return true;">kde.org</a>
<br>=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center
<br>=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:
<br>=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C =C2=A0966C 33F5 F005 6EF4=
 5358
<br>
<br></blockquote><div><br>My concern is that we couldn&#39;t trust the comp=
iler makers to properly set these macros EVEN IF they were making their bes=
t effort.=C2=A0 By definition, they won&#39;t likely know if a feature is s=
ufficiently bug free until it has spent some time accruing bug reports.<br>=
<br>I believe the &#39;best&#39; solution would be to have a community main=
tained include file to do this based on versions that everyone could pull i=
nto their projects.=C2=A0 A simple github file with these definitions based=
 on the major compilers, as long as it is sufficiently maintained, would do=
 a lot better than trusting that the compiler manufacturers release bug-fre=
e and tag appropriately.<br></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_162_1193958586.1438106994243--
------=_Part_161_337512148.1438106994243--

.
