From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Hans_=C3=85berg?= Newsgroups: gmane.lisp.guile.devel Subject: Re: c99 support Date: Fri, 29 Jun 2018 12:34:07 +0200 Message-ID: References: <8736xd45zc.fsf@pobox.com> <877emi2g9q.fsf@pobox.com> <7E46C070-8ABF-430E-8ACD-6FDE07AD84AF@telia.com> <20180629111027.4f60d93515b457653e24f2bb@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530268344 19629 195.159.176.226 (29 Jun 2018 10:32:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2018 10:32:24 +0000 (UTC) Cc: guile-devel@gnu.org To: Chris Vine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 29 12:32:20 2018 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYqhP-00051t-VN for guile-devel@m.gmane.org; Fri, 29 Jun 2018 12:32:20 +0200 Original-Received: from localhost ([::1]:41031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYqjX-0002Rt-7O for guile-devel@m.gmane.org; Fri, 29 Jun 2018 06:34:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYqjG-0002Qj-Rh for guile-devel@gnu.org; Fri, 29 Jun 2018 06:34:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYqjD-0004gG-OO for guile-devel@gnu.org; Fri, 29 Jun 2018 06:34:14 -0400 Original-Received: from v-smtpout1.han.skanova.net ([81.236.60.154]:36195) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYqjD-0004c7-GB for guile-devel@gnu.org; Fri, 29 Jun 2018 06:34:11 -0400 Original-Received: from [10.0.1.4] ([90.227.203.185]) by cmsmtp with ESMTPA id Yqj9f97yQqklnYqjAfGM3z; Fri, 29 Jun 2018 12:34:08 +0200 In-Reply-To: <20180629111027.4f60d93515b457653e24f2bb@gmail.com> X-Mailer: Apple Mail (2.3445.8.2) X-CMAE-Envelope: MS4wfOsiIojbJkgz99pS9lgsgl/sXiXEwJDlgOZXH+ftUL3F9VqTdr4WAEPyL1PC/p1qiLWxA70Bp+LIJ5nJH7NERYNW93NmasHa32MSpdIxQiRZFm0fvk3E Waf/8TprvxYCdx0wMHYsQWH8/59VHgSj+2Y9UpRXfxIkY53bUQfrS0sK+nx3HZuSgWc4fylMSmnpxprFF7tbe8jPaG8QrsOcmdE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 81.236.60.154 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19566 Archived-At: > On 29 Jun 2018, at 12:10, Chris Vine wrote: >=20 >> For C++, these are only optional, cf. [1], as they require no = padding. So an alternative is to typedef the obligatory int_fast<2^k>_t = types, perhaps leaving the API unchanged. >>=20 >> 1. https://en.cppreference.com/w/cpp/types/integer >=20 > The fixed size integer types are optional in C99/11 also, depending on > whether the platform provides a fixed size integer of the type in > question without padding and (for negative integers) a two's = complement > representation. =20 Yes, I saw that, too. It is important to ensure two's complement, too, = which the other types do not. > If, say, uint8_t is available in stdint.h for C, it > will be available for C++. =C2=A721.4.1/2 of C++17 makes this even = more > explicit: "The [cstdint] header defines all types and macros the > same as the C standard library header ". Which C version? In g++7, __STDC_VERSION__ is not defined, only = __STDC__. > I imagine guile will not run on any platform that does not support 8 > and 32 bit fixed size integers. I would think all CPUs support those types nowadays, so it is rather = theoretical.