220 29179 <aa0feb46-de22-4839-90a3-90189935181c@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Chris Hallock <christopherhallock@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Removing trivial undefined behaviour
Date: Thu, 27 Oct 2016 18:00:26 -0700 (PDT)
Lines: 71
Approved: news@gmane.org
Message-ID: <aa0feb46-de22-4839-90a3-90189935181c@isocpp.org>
References: <35daf87a-bf1d-46de-b16c-c2965fbadc8f@isocpp.org> <CAOHCbiu0Hd7LsMkKGcvxvo7h3TJzjZAuXPWxNT0WuESUfrFCaw@mail.gmail.com> <1314a997-2f74-4b52-9755-bc9d1deb6982@isocpp.org>
 <1612025.rPhQNZgPHV@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_358_1045427501.1477616426407"
X-Trace: blaine.gmane.org 1477616436 30047 195.159.176.226 (28 Oct 2016 01:00:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Oct 2016 01:00:36 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCHINCHEQEFBBK6GZLAAKGQEM3KVW5Q@isocpp.org Fri Oct 28 03:00:32 2016
Return-path: <std-proposals+bncBCHINCHEQEFBBK6GZLAAKGQEM3KVW5Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCHINCHEQEFBBK6GZLAAKGQEM3KVW5Q@isocpp.org>)
	id 1bzvWz-0006X4-UC
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Oct 2016 03:00:26 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id h14sf64441078ywa.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 27 Oct 2016 18:00:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=9N7ULVP71yH/vIbW402spRkngOj86D4j9eVcPaQdc1E=;
        b=AoYU9iVDOwW19eJPmZDfrNgg7awVuCB1hVe8yOTx8zbEWaCpv6lI3hlYlfTYYLeQx5
         dl8Rm3OK+BqAgXJ3ylA+1Rr5oTgrj8ENv03bp+FrTLJg+FaWuPXpmiVwpjC6SkMD7GqX
         14+rBIKjl7BmJpDLg59PWpV7ZnPzx8c/dh9rrE8dkvhwaxOKWb+K3ull+OkoDPfdLPD5
         SUHojvEzl8jpj7SOW5GKQ5mii4O68SH7L6xoZ2IzJNuM8GpLV9VU5u8/lAJCcgc0khlC
         OECRL92L0qox5dqNVEPRLFMyJKPh4rXVoMqSmjdYtdG3jIzVRR30O5PCKOODaow8exKp
         ZTcQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to: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=9N7ULVP71yH/vIbW402spRkngOj86D4j9eVcPaQdc1E=;
        b=CyNwNgzNbaozHmSCW6NE7wBqUWFRJi5rAIoQbErD9ai7JqnU1s4ddxAba1XZZloJWx
         HtgOSWjQjZAHxXqK5Sr0xr5YONoLrLTKrXpNFzep4L2d/BHnrdEOxe1N4VNbMx19YEcc
         YewU/a3BOkEVBTBGDW/ZNTYQGqIxbV80G1Ln5N37uAScOFluq9d/gHGKxvqOkKwXb98x
         dSM309vMEWwjQT5zbkgtAwLi/db28YpoEuAm7pYzQQMn0qLCXrjcYloOpg7VEIeBj0M2
         dEgAWkKs3ioIF4DROskIdh/5ld4FR1VRMeJL5sMM180bP6OnkC8mAlJQcYhfVEtGPdor
         YnaA==
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: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=9N7ULVP71yH/vIbW402spRkngOj86D4j9eVcPaQdc1E=;
        b=CoANYieNjFKi1lpYq2jcKB2VgPYfdqRHlryhC1jWsASTgv4KqVDc/mxeYbZ3k6JxYF
         zJg2RszcljKwbQPKCsAcwKMOWxY1zEdM3w0ay10x5UZB4t06rn9wlQjwS97NJ/EbxiaG
         QmgXBbNoUVIHidLrImiD+kCPck5xRFQz0qnhfs/HNK92H4nsZEhp583RjOydqm+27+FE
         FIgtxB26sGZaT3Jj4Z98sYCeaqulJbG+SZ6/Sg59nmtKNzAtHUINfNSoF+KwurrXy0zz
         XviHkaIEs07aYVpBZhR9wpm5eCafAcbZkQzoRE57cidiDnWmUyv4ypf7oyDIVIaUK4qu
         oQTw==
X-Gm-Message-State: ABUngvfT6Hi0T5jKU8jR+KUbxA2cUwqhu1TP3jX3nM8JIVqY5ZNExn3BH6xXDddFShUqYg==
X-Received: by 10.129.94.11 with SMTP id s11mr3598130ywb.76.1477616428425;
        Thu, 27 Oct 2016 18:00:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.15.174 with SMTP id d43ls5669160otd.11.gmail; Thu, 27 Oct
 2016 18:00:27 -0700 (PDT)
X-Received: by 10.157.52.205 with SMTP id t13mr1547239otd.8.1477616427632;
        Thu, 27 Oct 2016 18:00:27 -0700 (PDT)
In-Reply-To: <1612025.rPhQNZgPHV@tjmaciei-mobl1>
X-Original-Sender: christopherhallock@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: <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:29179
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29179>

------=_Part_358_1045427501.1477616426407
Content-Type: multipart/alternative; 
	boundary="----=_Part_359_449600356.1477616426407"

------=_Part_359_449600356.1477616426407
Content-Type: text/plain; charset=UTF-8


>
> Is [isdigit] even required to be a function in the first place?
>

I think so; isdigit is described as a function and its synopsis is a 
function declaration. But in C (and maybe C++), there may also be a macro 
if it can be defined in such a way that the argument is evaluated only once:

"[...] Any function declared in a header may be additionally implemented as 
a function-like macro [...] Any invocation of a library function that is 
implemented as a macro shall expand to code that evaluates each of its 
arguments exactly once, fully protected by parentheses where necessary, so 
it is generally safe to use arbitrary expressions as arguments. [...]" (C, 
7.1.4/1)

"Names that are defined as functions in C shall be defined as functions in 
the C ++ standard library." (C++, [headers]/6)

-- 
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/aa0feb46-de22-4839-90a3-90189935181c%40isocpp.org.

------=_Part_359_449600356.1477616426407
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Is [isdigit] =
even required to be a function in the first place?<br></blockquote><div><br=
>I think so; isdigit is described as a function and its synopsis is a funct=
ion declaration. But in C (and maybe C++), there may also be a macro if it =
can be defined in such a way that the argument is evaluated only once:<br><=
br>&quot;[...] Any function declared in a header may be additionally implem=
ented as a function-like macro [...] Any invocation of a library function t=
hat is implemented as a macro shall expand to code that evaluates each of i=
ts arguments exactly once, fully protected by parentheses where necessary, =
so it is generally safe to use arbitrary expressions as arguments. [...]&qu=
ot; (C, 7.1.4/1)<br><br>&quot;Names that are defined as functions in C shal=
l be defined as functions in the C ++ standard library.&quot; (C++, [header=
s]/6)</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/aa0feb46-de22-4839-90a3-90189935181c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/aa0feb46-de22-4839-90a3-90189935181c=
%40isocpp.org</a>.<br />

------=_Part_359_449600356.1477616426407--

------=_Part_358_1045427501.1477616426407--

.
