220 40467 <ppkc4l$6u0$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: David Brown <david@westcontrol.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Optional fixed point arithmetic was standardised
 into C in 2008. Why doesn't C++ adopt it?
Date: Wed, 10 Oct 2018 10:12:08 +0200
Lines: 51
Approved: news@gmane.org
Message-ID: <ppkc4l$6u0$1@blaine.gmane.org>
References: <c02eff57-39bb-4e54-b719-6598fe7a1585@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 1539159011 8262 195.159.176.226 (10 Oct 2018 08:10:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 10 Oct 2018 08:10:11 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDP6R2XHXIARBYHI63OQKGQEI5MLAMI@isocpp.org Wed Oct 10 10:10:07 2018
Return-path: <std-proposals+bncBDP6R2XHXIARBYHI63OQKGQEI5MLAMI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lj1-f197.google.com ([209.85.208.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDP6R2XHXIARBYHI63OQKGQEI5MLAMI@isocpp.org>)
	id 1gA9ZH-00024X-40
	for gclcip-std-proposals@m.gmane.org; Wed, 10 Oct 2018 10:10:07 +0200
Original-Received: by mail-lj1-f197.google.com with SMTP id r24-v6sf1348045ljr.18
        for <gclcip-std-proposals@m.gmane.org>; Wed, 10 Oct 2018 01:12:18 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1539159137; cv=pass;
        d=google.com; s=arc-20160816;
        b=jqoWhgIN6xPFxXGBxyJrwq350zgtbG9YzPu1QNwrYIFnNTS4AEX9QlmuZKAYU/7aZF
         pdatcq6B/4VUclYOVv228GWcLaowBICoOYULhu32F+FmmfWVfnnlV5SfU552/Qj7IVF/
         LZyF27/8Fn+qASBEjsjbzw19BKMb6eYqLqz/h1I01LjRhfHDjvw/lbz/CbqFtkTnVpWL
         ChH4bOxe3jAS1v3uvzkZBfNd7iJxm6yACheEP4JcVhgZRQfn3Yl20p4I9sMu3rw8FXuy
         i3OWYlHYJ81WL0h0J8UKbOjq+Kfoy56Z5zE+M7Wond39ORXob5F7Xo9du5c9F3mE+Hzz
         +dRQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:in-reply-to:user-agent
         :mime-version:references:message-id:lines:date:subject:from:to
         :dkim-signature;
        bh=UUKdHIbdZ97M7GGSjqSVPM2BIxXgzQtG/8p2em+sDsY=;
        b=NXecaLI0RL0os1pOMPUlM0NUDd5KiNBk1LwTUt/aEVXuCUJ7R2dOU/Hy5+Uuh6oJmI
         REqZXK105QD7Xa6JZ9BzQQi+/BTJKS4K0CEPKVsD0G1rtcIyoQuCHLMyk7RGBn02+NIB
         O2H2ED3eBbOj747ayVObdl5pKkpVHkTOf2U1uueKkh97LWb+quqq2QLy4/43FVltdDjk
         YQKi9hAhYWrPflw0PmhymO8WyVy8OkJXxlmwQ0y4MfM3r5IspZk1gDDZEcqzIr2gqdGw
         7DKlJHAKir5pAY5mCKK84fy1A+VYQyYB/5f+9Lh3POLrLmUgYaMW++pC+Y1SaivwHWLZ
         z/bg==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=UUKdHIbdZ97M7GGSjqSVPM2BIxXgzQtG/8p2em+sDsY=;
        b=K4nh0CgQBZFhG5E7ArVsL3+nVmhoGeK+Te+P9gVMocJ7SGreKOtNgUvPEZsKVwC3no
         MW84FxwSp6uO+fKVljMeMpfe0FK91w0WKdTf/9L0BS1qdRiGpaXm/a1eLiUKlSiBIhOf
         dns7Kx+cupQqyWt9vaZaXmLrN4E/ZGMOgq8AlV7fQKN+iuI3yb2y4pK+p50khAsgEuTB
         DPBjKIBGf+FHDiaZta4OtdzdrNBQsmeAG2sxMKVn4tHNx7wrhs43pE8rirqBr78ix+tq
         +p5yKhKC1oVW4ZhL15SzIqMTXOTIcxhQSzKH90RzRc3yEkgDm6sq8N2AxC66bKDUzwj7
         TkLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to: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=UUKdHIbdZ97M7GGSjqSVPM2BIxXgzQtG/8p2em+sDsY=;
        b=Oje/sSmNVtg+LyQjx8ID5zTCyrAHqyWXNwtt35r4bPIudi6oiF3lBlWKAVAgNYzgiy
         GNL4AlmPWkrKo4/dTBbe5ZWir8fuscph5G3XVdH4+GLAGUpRrYGpx/ToWSI95H0YzQZ8
         Wrk9t1vT+EdfrvBKRiTQL5h8Wx66zol/MG4bTYEWOIclHBlCA2IfDNuNDQIDGAtrVe5p
         aynRZ1mPApRA3B8mWtUX18ZkiRY0gWC6G/PjV7oVvsH7/bYGW5MEOLMDBQFtIhQZW1Kh
         fuSo4hLuhfMLfiV7wT5AqphgveDJOH8KS8P3Cd1KIDr+bfimGQpVXcv7Ug1h4aiK1WP0
         ju7A==
X-Gm-Message-State: ABuFfohKMizS/iyv4CkdDS1FGHf1NFJofx3PRvDpbQZT40pWZSpjJCY8
	/7B5wBevM9wndtn3o+YKzcY=
X-Google-Smtp-Source: ACcGV62cvHghCC10e++Eo2Oc3VEz2kPevkdbItZTdQBxbUSb3Crw8Iv9OaEV72MhB8N0cgWvhXd48Q==
X-Received: by 2002:a2e:9ed2:: with SMTP id h18-v6mr915110ljk.4.1539159137873;
        Wed, 10 Oct 2018 01:12:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a2e:9797:: with SMTP id y23-v6ls324672lji.27.gmail; Wed, 10
 Oct 2018 01:12:16 -0700 (PDT)
X-Received: by 2002:a2e:9d7:: with SMTP id 206-v6mr21315106ljj.127.1539159136330;
        Wed, 10 Oct 2018 01:12:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1539159136; cv=none;
        d=google.com; s=arc-20160816;
        b=A/wnGHKpT+J37yAw+XxP2Ku51yNP5R8/fSereSg3h33u00TOuuiUqu66kc81NKLYxV
         Q7tEHY7YXYs9V28srd/4zdBral6fHR2VXHL18RrXs8tXUb2FGcQEX/ULET52qBFcIzQE
         jUuc2eR6ikKXhBIDT0ZCTtPMeYXHkNOWA4JolOrHFEFiAFiy3dCqtz9vj8RTW8afHj8N
         Exb3GeYqLDRhAJTvkdhwXfIsfy7sr6b7bKQIMvZvaSefG4HIwPh5XbIgmZ8b2qTgEjaX
         C+RMVzJFv+4MWXvD5vNu9X7B69y/rb/Y8Pag49G/N8cAiKm3QV8ugQBxOmsyKcQ4B+P4
         qiRQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=in-reply-to:user-agent:content-transfer-encoding:mime-version
         :references:message-id:lines:date:subject:from:to;
        bh=8oP38GqxOwBaUveE/EkDTXGWVEql0HxL5Mt4KRhy5uM=;
        b=k5Yaqw+9/WJ+fJ0e40hNkfMHlBvG82fdOkfX1gY0a7L5MOIhD8ypRO/EnIL6HuDee8
         mMCfOXWPvq9Nzlg3EY4dr3Qy7RJRf+5Z+yv4U1NR8XkIp9RMoiD5xkCvU2w9Rf+U8P15
         u1mwnA8an+wo33crYRVR8e44OquGq+FaFNx9f3T3oU0j6IYGCSosajrH+fNJXUzHpngb
         J+z4J+Bj2xLoK3MpfWSRjyk5lE7h1CoCpGQ/ptohIQrlY9PtWeNeqwrpP3/6X4KR2i8K
         aE0csHed3dIRyaKNxI6cSAt22F5/G8oYOlU2JhFytu9QNSK5qfyTkRqHOYIKfApG/jAl
         LiOg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id k62-v6si22256037lje.45.2018.10.10.01.12.16
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 10 Oct 2018 01:12:16 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1gA9ZD-00020e-UA
	for std-proposals@isocpp.org; Wed, 10 Oct 2018 10:10:03 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 44
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <c02eff57-39bb-4e54-b719-6598fe7a1585@isocpp.org>
X-Original-Sender: david@westcontrol.com
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
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>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:40467
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40467>

On 08/10/18 20:25, Niall Douglas wrote:
> So, learned something new from WG14 today, namely that C standardised
> optional fixed point arithmetic back in 2004, with a second edition in
> 2008. I didn't know that before. Here is a pre-publication draft of the
> standard *ISO/IEC TR 18037:2008*:
> 
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf
> 
> Why doesn't WG21 simply adopt this instead of the (library) fixed point
> arithmetic proposals currently before it?
> 

Well, almost no C compilers support that standard - because almost no
one wants to use it.  The TR has 3 key areas that are supposed to
improve C programming in the embedded world.  It covers fixed-point
arithmetic in a way no one wants (especially not embedded programmers),
named address spaces that are underpowered, and hardware I/O that is not
needed, not useful, and contrary to the way every embedded compiler and
programmer handles it.

The TR for "C Extensions to support embedded processors" is a huge
disappointment, a result of a /total/ failure to look at the realities
of the industry in terms of what embedded toolchains provide and what
embedded programmers want, combined with an absurd time schedule.  While
the group behind this spend many years slowly writing the document in a
couple of versions, everyone in the embedded development industry got on
with their jobs.  So by the time it was published, it would have been
irrelevant even if it had been useful.

I only know of one compiler that has some implementation of this TR's
fixed point types - that is gcc, which implements it on some targets.  I
have tried it, and the code generated is hopeless despite the target
processor having support for some fixed point formats.  It is basically
a matter of a gcc developer in the past having implemented the front-end
parts and very basic code generation, presumably with the intention that
others would pick up the ball and turn it into more optimal code now
that the process had been started.  However, it has seen no interest
(AFAIK) from either compiler developers or users.

I haven't heard anything about a C++ standard library for fixed-point
arithmetic, but it would be very difficult to produce something worse
than this C "extension" TR that has been rightly ignored.



-- 
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/ppkc4l%246u0%241%40blaine.gmane.org.

.
