220 29170 <1612025.rPhQNZgPHV@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Removing trivial undefined behaviour
Date: Thu, 27 Oct 2016 14:40:37 -0700
Lines: 23
Approved: news@gmane.org
Message-ID: <1612025.rPhQNZgPHV@tjmaciei-mobl1>
References: <35daf87a-bf1d-46de-b16c-c2965fbadc8f@isocpp.org> <CAOHCbiu0Hd7LsMkKGcvxvo7h3TJzjZAuXPWxNT0WuESUfrFCaw@mail.gmail.com> <1314a997-2f74-4b52-9755-bc9d1deb6982@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1477604452 15840 195.159.176.226 (27 Oct 2016 21:40:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 27 Oct 2016 21:40:52 +0000 (UTC)
User-Agent: KMail/5.3.2 (Linux/4.8.3-1-default; KDE/5.26.0; x86_64; ; )
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBWHIZHAAKGQEINRKWQY@isocpp.org Thu Oct 27 23:40:46 2016
Return-path: <std-proposals+bncBCB4TK757YBRBWHIZHAAKGQEINRKWQY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f71.google.com ([74.125.82.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBWHIZHAAKGQEINRKWQY@isocpp.org>)
	id 1bzsPd-0002LO-Qg
	for gclcip-std-proposals@m.gmane.org; Thu, 27 Oct 2016 23:40:37 +0200
Original-Received: by mail-wm0-f71.google.com with SMTP id 79sf18226067wmy.6
        for <gclcip-std-proposals@m.gmane.org>; Thu, 27 Oct 2016 14:40:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:user-agent:in-reply-to:references
         :mime-version: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=mqDoJmm3OhmKkPlBEZZ2G3xMBcy4DD7dWLYfb9ajwBg=;
        b=ChBO+AmBjczCtUThkNYpsPRhB57D5rK94orImtuG5behkC1OOPxAQM4NbXcw6izQ1+
         VTdu45XturcrNTXQWj91JSbbNg//76lA5r3Je5oH0yVbACU+rNo3izNSkg8VLptiMGDJ
         /pnuHaPGGVYAMPSKQ+KX3uvHROHsPP5bglS9qpTsNNaQQm+LwFUMZlSUvMAfMVuZViAQ
         AOhCFrJWad8OlR99pTHpO7GbSZiCvNDq07Et3JobTM83Ov36za2679POEElP8AEvV6NF
         hq/zieWSAQ9ZmZBBnWj7XdHHIKG6ydN/z2sk+MHsmBM3cn3YA2+XzCOYqSwxVk4qjOuE
         n/VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version: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=mqDoJmm3OhmKkPlBEZZ2G3xMBcy4DD7dWLYfb9ajwBg=;
        b=cuHnaS4CH+4REoD2VhhaNTwrVpPLjdsCjvxfWqlC4mGnuDN3xGiSvBxl76EQ5pulOV
         tmbInoBaf05yMgHIQ89vF3pB3MSnOajLYAxogjKjp8lW2Hj6bKX5QiDurDHmzCWY7E9n
         D2qgPuCAZ88bJ3IQA0uh+vtLeDg47cErEnDg6YLhozqGxlo1xkXZSZHe2+6pfDwinjXP
         euGsB9VGuoTz8m7zUsDp94OwT6ik1eiBWxMkjmoHhqs31t6wznasjX6OfcPwU80mRzdP
         6+n5pEjZi2kCSInfiZ2z9zmqePoxhK0bUKYq96zfmeKbgKPczDTPOPSbKlhevPD/yHL6
         A6zQ==
X-Gm-Message-State: ABUngvdtqGNqFq4AcTCu76mBfNzJLYKBbtRhUQGRO9Z3kU4HVCXb1jkXIdy5b+pCkjVA+g==
X-Received: by 10.28.20.7 with SMTP id 7mr39811wmu.11.1477604440634;
        Thu, 27 Oct 2016 14:40:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.148.2 with SMTP id w2ls104990wmd.19.gmail; Thu, 27 Oct 2016
 14:40:39 -0700 (PDT)
X-Received: by 10.28.13.144 with SMTP id 138mr433013wmn.41.1477604439713;
        Thu, 27 Oct 2016 14:40:39 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id k3si5804975wme.37.2016.10.27.14.40.39
        for <std-proposals@isocpp.org>;
        Thu, 27 Oct 2016 14:40:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl1.localnet (jfdmzpr02-ext.jf.intel.com [134.134.137.71])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 599AF11B376
	for <std-proposals@isocpp.org>; Thu, 27 Oct 2016 14:40:39 -0700 (PDT)
In-Reply-To: <1314a997-2f74-4b52-9755-bc9d1deb6982@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:29170
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29170>

On quarta-feira, 26 de outubro de 2016 08:34:06 PDT T. C. wrote:
> That breaks anything that expects ::isdigit to be unambiguous (e.g., pass
> it to an algorithm).

Is it even required to be a function in the first place? Many implementations 
in C define it to be a macro that reads from an array. Even glibc:

# define __isctype(c, type) \
  ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
[...]
# define isdigit(c)	__isctype((c), _ISdigit)

Though glibc only does that in C mode, not in C++.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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/1612025.rPhQNZgPHV%40tjmaciei-mobl1.

.
