220 13366 <6cc0543b-ce2b-4cf3-bc18-bf1a5be8a270@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Douglas Boffey <douglas.boffey@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: proposal: deprecate failure to return
 (without annotation)
Date: Tue, 30 Sep 2014 02:07:43 -0700 (PDT)
Lines: 96
Approved: news@gmane.org
Message-ID: <6cc0543b-ce2b-4cf3-bc18-bf1a5be8a270@isocpp.org>
References: <m0cb44$d2e$1@ger.gmane.org> <2106187.KAVOBzdsgo@tjmaciei-mobl4> <m0ceva$afs$1@ger.gmane.org>
 <7890243.H6e3ul2NkU@tjmaciei-mobl4>
 <b683c410-90f8-449e-b966-ecdbc823ece4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_4142_433762223.1412068064024"
X-Trace: ger.gmane.org 1412068078 26585 80.91.229.3 (30 Sep 2014 09:07:58 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 30 Sep 2014 09:07:58 +0000 (UTC)
Cc: gmisocpp@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDSIZVXVVUFBBYHFVGQQKGQE35ECECA@isocpp.org Tue Sep 30 11:07:52 2014
Return-path: <std-proposals+bncBDSIZVXVVUFBBYHFVGQQKGQE35ECECA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f199.google.com ([209.85.192.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSIZVXVVUFBBYHFVGQQKGQE35ECECA@isocpp.org>)
	id 1XYtPR-0000zC-C9
	for gclcip-std-proposals@m.gmane.org; Tue, 30 Sep 2014 11:07:49 +0200
Original-Received: by mail-pd0-f199.google.com with SMTP id ft15sf21751371pdb.6
        for <gclcip-std-proposals@m.gmane.org>; Tue, 30 Sep 2014 02:07:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        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:content-type;
        bh=o0O93zUww6qc5xOBsLA+KdUqgGSRYAdmTXbBl9vNGTA=;
        b=IfKby1hps3umSBJszhm5srf/DCYCkUzktV2IVwvQ0p4TEXjFzB81XOfUyo/aJizrdu
         GL/wIDYZ4CjBNYMPg07K8HvbJHdD5LnuOABPu4I/19rtSeyTHveRwT4zZRfZg/V/XAYF
         nj4XJMg9i/TaoXiGiOCATEAOIFM11HVT9I81X9St1vDshFSAwRORti+z0kJNMeTwA7g0
         GDIiPJ3BlophO+ZJ+kgbCBsmUVBh8fp3Xf9Yky6d4S+uVbmrI5zHgoMj+Ph3N5F3INsW
         8ZTwlWOpQKSroG5fv0EqE7T+16C09KYjX7Z3ZN6JMCRHloH82febaCidnuZNbah42ROc
         ed3A==
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:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=o0O93zUww6qc5xOBsLA+KdUqgGSRYAdmTXbBl9vNGTA=;
        b=drO8XsGc1kNM8RbYnZOLAS7I+L3z3TYKBIBsFMBeX8ws+rXQDXjV4znzKWr71ndvGS
         628H/G0PIk8hKbEUkMpcxaw4LgGjbfG41gmdT6Os3WoAMvqMd2bSdKVcOCIDAmi3rEZh
         J8vuKqNoaLfRTjK72W9sya1+oKOPiAZLptyslTzZ1eHdhtLg8tUvEy5ZUnYk9dmjIO8A
         V98CFJdKPgN0KFGJC7dbbGHVF0CQ+AV0RcPIL9YhquTp1KSCqFOqY1Xe/RIIkHLbFUAv
         5xfAwbFzT/3EOQP3woZb/DLTS6oStcc2gMMnuDn8gviAGZXugcJBKtZoDDH4ixm1Xsal
         713Q==
X-Gm-Message-State: ALoCoQmnFa0JRFCd6mHBxFcNjWw5vOxAuw+sif/Uchrgj5HYWgrmGgANmTQmlFcdw0kcTnzadT8b
X-Received: by 10.66.196.70 with SMTP id ik6mr39961279pac.44.1412068065482;
        Tue, 30 Sep 2014 02:07:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.23.240 with SMTP id 103ls529603qgp.45.gmail; Tue, 30 Sep
 2014 02:07:44 -0700 (PDT)
X-Received: by 10.140.102.110 with SMTP id v101mr10755qge.6.1412068064776;
        Tue, 30 Sep 2014 02:07:44 -0700 (PDT)
In-Reply-To: <b683c410-90f8-449e-b966-ecdbc823ece4@isocpp.org>
X-Original-Sender: Douglas.Boffey@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: <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:13366
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13366>

------=_Part_4142_433762223.1412068064024
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


On Tuesday, 30 September 2014 00:28:04 UTC+1, gmis...@gmail.com wrote:
>
>   // noreturn works like this:
>   // 1. Compiler attempts to verify the no_return block is unreachable,
>   // if it unreachable, no code is generated and no warning is issued.
>   // 2. If compiler can't verify the block is unreachable, a warning is=
=20
> issued
>   // and the code inside the block is generated.
>   // 3. If that code cannot be verified as not returning,
>   // compiler injects code to ensure there is no way to return.=20
>   // i.e. code to ensure std::terminate() is called the end of the block.
>   try
>   {
>       app_exit();=20
>   }
>   catch(...)
>   {
>     // Would be nice if compiler offered the ability to=20
> inject __debug_break here too in some situations like for debug builds.
>     //.Then we can more easily diagnose the code where we made a=20
> wrong assumption.
>     std::terminate();
>   } =20
> }
>
> Thoughts?
>
=20
Hmm.  std::terminate injected into production code without being=20
explicity stated?  I don=E2=80=99t think I=E2=80=99d like that=E2=80=94for =
some production code,=20
premature termination is not an option.=20

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_4142_433762223.1412068064024
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Tuesday, 30 September 2014 00:28:04 UTC+1, gmis...@=
gmail.com  wrote:<blockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-le=
ft: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; bor=
der-left-style: solid;" class=3D"gmail_quote"><div dir=3D"ltr"><div>&nbsp; =
// noreturn works like this:<br>&nbsp; // 1. Compiler attempts to verify th=
e no_return block is unreachable,<br>&nbsp; // if it unreachable, no code i=
s generated and no warning is issued.<br>&nbsp; // 2. If&nbsp;compiler can'=
t verify the block is unreachable, a warning is issued<br>&nbsp; // and the=
 code inside the block is generated.<br>&nbsp; //&nbsp;3. If&nbsp;that code=
 cannot be verified as not returning,<br>&nbsp; //&nbsp;compiler injects co=
de to ensure there is no way to return. </div><div>&nbsp; // i.e. code to e=
nsure std::terminate() is called the end of the block.<br>&nbsp; try<br>&nb=
sp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; app_exit(); <br>&nbsp; }<br>&nbsp; =
catch(...)<br>&nbsp; {</div><div>&nbsp;&nbsp;&nbsp; // Would be nice if com=
piler&nbsp;offered the&nbsp;ability to inject&nbsp;__debug_break&nbsp;here =
too in some situations like for debug builds.</div><div>&nbsp;&nbsp;&nbsp; =
//.Then we&nbsp;can more easily diagnose&nbsp;the code where we made a wron=
g&nbsp;assumption.<br>&nbsp;&nbsp;&nbsp; std::terminate();<br>&nbsp; }&nbsp=
; <br>}</div><div><br></div><div>Thoughts?</div></div></blockquote><div>&nb=
sp;</div><div>Hmm.&nbsp; std::terminate injected into production code witho=
ut&nbsp;being explicity&nbsp;stated?&nbsp; I don=E2=80=99t think I=E2=80=99=
d like that=E2=80=94for some production code, premature termination is not =
an option.&nbsp;</div></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_4142_433762223.1412068064024--

.
