220 24196 <CAJnLdOYZq4HH1SVYf_D_CmmN28LjAivY=8LM58t8kEWC5bw2dw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Edward Catmur' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Change the specified behavior when
 control flow reaches the end of non-void functions
Date: Thu, 4 Feb 2016 22:58:24 +0000
Lines: 77
Approved: news@gmane.org
Message-ID: <CAJnLdOYZq4HH1SVYf_D_CmmN28LjAivY=8LM58t8kEWC5bw2dw@mail.gmail.com>
References: <5115b78c-8fb4-4c72-a278-f74c636f5217@isocpp.org>
	<CAEhD+6B262A5dUuUOnKO7z_EnQki62OgHw0v3p_OahonSvZTwA@mail.gmail.com>
	<ec9e6080-1bed-4d84-a9a2-e7d56d784377@isocpp.org>
	<2511401.bv6yOhHB5J@tjmaciei-mobl4>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b3a9712ff5e03052af9aba9
X-Trace: ger.gmane.org 1454626718 30513 80.91.229.3 (4 Feb 2016 22:58:38 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 4 Feb 2016 22:58:38 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDZLZTXF7UJBBEFPZ62QKGQE45YV22Y@isocpp.org Thu Feb 04 23:58:34 2016
Return-path: <std-proposals+bncBDZLZTXF7UJBBEFPZ62QKGQE45YV22Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f71.google.com ([209.85.218.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDZLZTXF7UJBBEFPZ62QKGQE45YV22Y@isocpp.org>)
	id 1aRSr9-0002qx-P5
	for gclcip-std-proposals@m.gmane.org; Thu, 04 Feb 2016 23:58:31 +0100
Original-Received: by mail-oi0-f71.google.com with SMTP id i14sf72513536oig.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 04 Feb 2016 14:58:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type: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=5qGFR/2Vp/EJhaMwF7zCl5m5BeBXdyVKVs9Yr+7KwQE=;
        b=RgZ6hytnrOfbMJZAXzGx1sq/TtR9P+FKr1RS5RJFKJiDDbU6RcXA37deNA8gEKSjWn
         XhxITzhuFH0ISN2oW8BBvbzU6IFvxuMjstul6ilHPuX06h0klCHNKRCuG6MnLTBZI0BD
         21ieXjL+B8xGIUsQEK0BJuFSGu5HFi5SZO8O6VzQCFX/Ea1UoicJaWbHcUuwNds3M45k
         aWSCbRWSSP95r9i8i8OewcM6o4WSrCJLHj0a1rdP2hJALNB2rexXisn8o5XrJoTJROwv
         NBS6NkQglHkdWLKdCcd4MNfExgpuoTJrSlH9Om8cxl9CobtJdoPhR05eDf4IKWB9h07P
         w2bg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type: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=5qGFR/2Vp/EJhaMwF7zCl5m5BeBXdyVKVs9Yr+7KwQE=;
        b=R6PO1onfEv8sVp9Nsgf1CcZCZPeo+wWeZ2GbVIvtfp+tSHi4zz4Y+yiD1SMbTwDZAo
         CWJC+NkWosr5K1ZxS0D5Xq5aqnPSB7m1PKB4xhR8sphAdDrsZivbS2SDuZK2rHMCRuph
         SEg78Lwa4svaqvNNJnHIX4pH4JTWTEmPFTpGe1d1tXrTxc73xJfI3FSk+v6WkzSfVKic
         5A64jwkCBbfUXOqYS+oAUFKR0ukPfmTtrzQgeU/Tm1RezdcWed196knaCvQJEac9Q3gm
         yME/11hGlCtD8DIrn1cUEJp6nKr9WWyrwtXj7ihQacYswzJj4spxM4rGNpMs0bz2+4d6
         h1vw==
X-Gm-Message-State: AG10YOTBmpo2KBoEJs+Rdl6T4EASTyCdOxhnkZN7mEIpVDED876ndCve5pwzkrq80e3i9A==
X-Received: by 10.107.155.84 with SMTP id d81mr10923033ioe.27.1454626705555;
        Thu, 04 Feb 2016 14:58:25 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.221.34 with SMTP id qb2ls33755igc.18.canary; Thu, 04 Feb
 2016 14:58:24 -0800 (PST)
X-Received: by 10.107.170.140 with SMTP id g12mr13410240ioj.44.1454626704657;
        Thu, 04 Feb 2016 14:58:24 -0800 (PST)
Original-Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com. [2607:f8b0:4001:c05::22b])
        by mx.google.com with ESMTPS id ee8si15091869igb.85.2016.02.04.14.58.24
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 04 Feb 2016 14:58:24 -0800 (PST)
Received-SPF: pass (google.com: domain of ecatmur@googlemail.com designates 2607:f8b0:4001:c05::22b as permitted sender) client-ip=2607:f8b0:4001:c05::22b;
Original-Received: by mail-ig0-x22b.google.com with SMTP id ik10so27450169igb.1
        for <std-proposals@isocpp.org>; Thu, 04 Feb 2016 14:58:24 -0800 (PST)
X-Received: by 10.50.111.225 with SMTP id il1mr6738914igb.6.1454626704411;
 Thu, 04 Feb 2016 14:58:24 -0800 (PST)
Original-Received: by 10.36.124.76 with HTTP; Thu, 4 Feb 2016 14:58:24 -0800 (PST)
In-Reply-To: <2511401.bv6yOhHB5J@tjmaciei-mobl4>
X-Original-Sender: ecatmur@googlemail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ecatmur@googlemail.com designates 2607:f8b0:4001:c05::22b as
 permitted sender) smtp.mailfrom=ecatmur@googlemail.com;       dkim=pass
 header.i=@googlemail.com;       dmarc=pass (p=QUARANTINE dis=NONE) header.from=googlemail.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>
X-Original-From: Edward Catmur <ecatmur@googlemail.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:24196
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24196>

--047d7b3a9712ff5e03052af9aba9
Content-Type: text/plain; charset=UTF-8

On Thu, Feb 4, 2016 at 10:33 PM, Thiago Macieira <thiago@macieira.org>
wrote:

> On quinta-feira, 4 de fevereiro de 2016 02:57:30 PST Edward Catmur wrote:
> > The proposal would be worse than the current ubsan offering, not just in
> > making it compulsory but also because calling std::terminate discards
> > information on the nature and location of the error; ubsan outputs the
> > source location and describes the error: "main.c:3:3: missing return
> > statement", or some such.
>
> The information loss is not a requirement. The runtime could print the
> reason
> for termination before termination.
>

How? std::terminate_handler is specified as void(*)() so there's nowhere to
pass in the reason. Existing terminate_handlers look at
std::current_exception, so I suppose you could smuggle it in there, but
then you might as well throw that exception directly.

-- 

--- 
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 https://groups.google.com/a/isocpp.org/group/std-proposals/.

--047d7b3a9712ff5e03052af9aba9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Feb 4, 2016 at 10:33 PM, Thiago Macieira <span dir=3D"ltr">&lt;<a href=
=3D"mailto:thiago@macieira.org" target=3D"_blank">thiago@macieira.org</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">On quinta-feira, 4 de fe=
vereiro de 2016 02:57:30 PST Edward Catmur wrote:<br>
&gt; The proposal would be worse than the current ubsan offering, not just =
in<br>
&gt; making it compulsory but also because calling std::terminate discards<=
br>
&gt; information on the nature and location of the error; ubsan outputs the=
<br>
&gt; source location and describes the error: &quot;main.c:3:3: missing ret=
urn<br>
&gt; statement&quot;, or some such.<br>
<br>
The information loss is not a requirement. The runtime could print the reas=
on<br>
for termination before termination.<br></blockquote><div><br></div><div>How=
? std::terminate_handler is specified as void(*)() so there&#39;s nowhere t=
o pass in the reason. Existing terminate_handlers look at std::current_exce=
ption, so I suppose you could smuggle it in there, but then you might as we=
ll throw that exception directly.</div></div></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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--047d7b3a9712ff5e03052af9aba9--

.
