220 24202 <CAJnLdOYjkPnjmg+qbT4UEjqLrTvK12zXpyYj+3YPFFKy_OCW-Q@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 23:47:35 +0000
Lines: 114
Approved: news@gmane.org
Message-ID: <CAJnLdOYjkPnjmg+qbT4UEjqLrTvK12zXpyYj+3YPFFKy_OCW-Q@mail.gmail.com>
References: <5115b78c-8fb4-4c72-a278-f74c636f5217@isocpp.org>
	<2511401.bv6yOhHB5J@tjmaciei-mobl4>
	<CAJnLdOYZq4HH1SVYf_D_CmmN28LjAivY=8LM58t8kEWC5bw2dw@mail.gmail.com>
	<1851432.TiVlt5xrhH@tjmaciei-mobl4>
	<CAJnLdObDg=-saRLpYau-C4iO4oWDcwgZkcggBg0fjevUtOKRFw@mail.gmail.com>
	<CAFk2RUb7P++1if3G9ab09XggHi0p-s1PeKW8V_8rok=ohUTxLQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113ea6c2e47c55052afa5b6a
X-Trace: ger.gmane.org 1454629660 11961 80.91.229.3 (4 Feb 2016 23:47:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 4 Feb 2016 23:47:40 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDZLZTXF7UJBBF6GZ62QKGQE5RVWEGA@isocpp.org Fri Feb 05 00:47:40 2016
Return-path: <std-proposals+bncBDZLZTXF7UJBBF6GZ62QKGQE5RVWEGA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDZLZTXF7UJBBF6GZ62QKGQE5RVWEGA@isocpp.org>)
	id 1aRTcf-0006VT-Pk
	for gclcip-std-proposals@m.gmane.org; Fri, 05 Feb 2016 00:47:37 +0100
Original-Received: by mail-io0-f200.google.com with SMTP id o62sf157646703ioi.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 04 Feb 2016 15:47:37 -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=jeY2ndzi0MXZrlH95R7ULUfrc2R1KHr0dQ/6ZxTaCGY=;
        b=pmlWn4unD9Rk4yCrKNlJ0F7PPK1I/w6sZdW8jflZBDrufEP5jfMCCMZaWX+BsrDK89
         zlE7PakNRs41gYj2r365OV8/KVqU7NZejCWzZbgOkiQKp7aJEYMg2XiaPhuWNxu2mjM4
         qMl824Hw55LKNWvvuCBVyWqTNrnZOFdgIzGZAIxqVCg0x2/dZdtWbEjm2rhPym1OblbC
         GDdo+dZp+jH3lWZ2XUFLlUwLsKFKHp8oFLeEJHco4L+UCccqYFx8ZIIc9Vtt2tawQ2+j
         qE2nENYdvddqO5dQvYsnCNCu1Zi2Y3/6hhkupfEcUL8gBxDJLBwZFG3M3WDihhOOuF8s
         LxOQ==
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=jeY2ndzi0MXZrlH95R7ULUfrc2R1KHr0dQ/6ZxTaCGY=;
        b=XTi5tS6/QF1a6IYpLPG4YvCrGH1p2CW8IJSjQNafBvWpxtX2TCfnrskCKanugbOUnt
         MqkNW40dZJdCo4DM4fOGTTUambDolLYgF2RExYPp11HZD6b624+gM0Lq/ilGdNX6aM48
         s7TVUp2VTOBogKtwZOKvDJTy71VKLkoUqJw+AF5mmjiLaI3gcvTvaTgqPax6cmYn7o+s
         P2VdogtK9dC4PRNWHM3L2M2uRMw6L/xQlaZ4WPyF6YqQKSt6gcZn9Ym3oGFVCYQK/wlM
         eCHgKvmOjXKllkwDIukBm5IUBfzVRWO/VbsbU3Oea1S2AHjMMg0kFVLnr2h9WUh6Uhu0
         DPwg==
X-Gm-Message-State: AG10YOS5QFlwiROeA5yVNN3TOJY7bq1Rr/88cW4w2toiPomq2oKcmKKOJW0HVXlfIkFz3Q==
X-Received: by 10.182.56.233 with SMTP id d9mr9557825obq.2.1454629656558;
        Thu, 04 Feb 2016 15:47:36 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.26.202 with SMTP id a193ls270792ioa.87.gmail; Thu, 04 Feb
 2016 15:47:35 -0800 (PST)
X-Received: by 10.50.17.39 with SMTP id l7mr6976264igd.18.1454629655555;
        Thu, 04 Feb 2016 15:47:35 -0800 (PST)
Original-Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com. [2607:f8b0:4001:c06::22f])
        by mx.google.com with ESMTPS id h26si23314954iod.39.2016.02.04.15.47.35
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 04 Feb 2016 15:47:35 -0800 (PST)
Received-SPF: pass (google.com: domain of ecatmur@googlemail.com designates 2607:f8b0:4001:c06::22f as permitted sender) client-ip=2607:f8b0:4001:c06::22f;
Original-Received: by mail-io0-x22f.google.com with SMTP id g73so111543983ioe.3
        for <std-proposals@isocpp.org>; Thu, 04 Feb 2016 15:47:35 -0800 (PST)
X-Received: by 10.107.3.79 with SMTP id 76mr11443356iod.101.1454629655441;
 Thu, 04 Feb 2016 15:47:35 -0800 (PST)
Original-Received: by 10.36.124.76 with HTTP; Thu, 4 Feb 2016 15:47:35 -0800 (PST)
In-Reply-To: <CAFk2RUb7P++1if3G9ab09XggHi0p-s1PeKW8V_8rok=ohUTxLQ@mail.gmail.com>
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:c06::22f 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:24202
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24202>

--001a113ea6c2e47c55052afa5b6a
Content-Type: text/plain; charset=UTF-8

On Thu, Feb 4, 2016 at 11:32 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 5 February 2016 at 01:25, 'Edward Catmur' via ISO C++ Standard -
> Future Proposals >> > > 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.
> >>
> >> Because the compiler does not need to directly call std::terminate. It
> can
> >> call a function of its own that prints the information, then calls
> >> std::terminate.
> > Thereby requiring that all C++ programs have a console attached, and
> denying
> > them control over what is output to that console?
>
>
> Doing that does not in any way require a console to be attached, and
> various
> tools have been outputting such diagnostics into the standard error output
> many
> years. I don't quite grasp what you think is the problem here.


Those tools are optional; they are not mandated by the standard. The
problem is that you're proposing to terminate a program without giving the
program itself any indication of why the termination is occurring; the only
indication is a diagnostic emitted to a standard error output that may be
discarded if it even exists at all.

-- 

--- 
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/.

--001a113ea6c2e47c55052afa5b6a
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 11:32 PM, Ville Voutilainen <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:ville.voutilainen@gmail.com" target=3D"_blank">ville.voutilaine=
n@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 5 Fe=
bruary 2016 at 01:25, &#39;Edward Catmur&#39; via ISO C++ Standard -<br>
Future Proposals &gt;&gt; &gt; &gt; The information loss is not a requireme=
nt. The<br>
<span class=3D"">runtime could print the<br>
&gt;&gt; &gt; &gt; reason<br>
&gt;&gt; &gt; &gt; for termination before termination.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; How? std::terminate_handler is specified as void(*)() so ther=
e&#39;s nowhere<br>
&gt;&gt; &gt; to<br>
&gt;&gt; &gt; pass in the reason. Existing terminate_handlers look at<br>
&gt;&gt; &gt; std::current_exception, so I suppose you could smuggle it in =
there, but<br>
&gt;&gt; &gt; then you might as well throw that exception directly.<br>
&gt;&gt;<br>
&gt;&gt; Because the compiler does not need to directly call std::terminate=
.. It can<br>
&gt;&gt; call a function of its own that prints the information, then calls=
<br>
&gt;&gt; std::terminate.<br>
&gt; Thereby requiring that all C++ programs have a console attached, and d=
enying<br>
&gt; them control over what is output to that console?<br>
<br>
<br>
</span>Doing that does not in any way require a console to be attached, and=
 various<br>
tools have been outputting such diagnostics into the standard error output =
many<br>
years. I don&#39;t quite grasp what you think is the problem here.</blockqu=
ote><div><br></div><div>Those tools are optional; they are not mandated by =
the standard. The problem is that you&#39;re proposing to terminate a progr=
am without giving the program itself any indication of why the termination =
is occurring; the only indication is a diagnostic emitted to a standard err=
or output that may be discarded if it even exists at all.</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 />

--001a113ea6c2e47c55052afa5b6a--

.
