From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.devel Subject: Re: c99 support Date: Fri, 29 Jun 2018 16:35:49 +0100 Message-ID: <20180629163549.ee530b4c3738f36e85a3a5e3@gmail.com> 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530288550 16422 195.159.176.226 (29 Jun 2018 16:09:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2018 16:09:10 +0000 (UTC) Cc: guile-devel@gnu.org To: Hans =?ISO-8859-1?Q?=C5berg?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 29 18:09:06 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 1fYvxH-00048u-Ca for guile-devel@m.gmane.org; Fri, 29 Jun 2018 18:09:03 +0200 Original-Received: from localhost ([::1]:43264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYvzO-0006RI-Ny for guile-devel@m.gmane.org; Fri, 29 Jun 2018 12:11:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYvRG-0000zt-QN for guile-devel@gnu.org; Fri, 29 Jun 2018 11:36:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYvRB-0002S1-Mu for guile-devel@gnu.org; Fri, 29 Jun 2018 11:35:56 -0400 Original-Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:39560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYvRB-0002PD-Gi for guile-devel@gnu.org; Fri, 29 Jun 2018 11:35:53 -0400 Original-Received: by mail-wr0-x243.google.com with SMTP id b8-v6so9248809wro.6 for ; Fri, 29 Jun 2018 08:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qk7bEUnzGmFAbSJp+JqMn6jg9G9MOtYvMt5ylwi0CEY=; b=ocOL4jo7sOt680gtD449YQkcclUwT+sxx/NnfnCXZrlSRGPJTHGsD/VwgDMnkRK5sQ n0fhcQp0MZuj9UE7afI5HiX5LaJZAhrKrPpSWeDN+uVMDMxVKrqC9fMeiD7HXTbJmrqC 8Cri1MRa/0vtxIlTbigiXOCy+aYvPKHkpbYugX2qsP2w//QwF6SkGpTfaT2bgNEVOLYq 9SDLIdPpCCuQ8ynTZa5JetZstDnTY39TmBHiZn1EvWecRCyY5QYzuPcq4UOCtxhvZPFI InWY3ka1P6gNZuVRUwoTpbmEmDLMUHjgbkC09Bd2kMTpSQ60tNxN4u2H0TOj2N5duyiI UKIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qk7bEUnzGmFAbSJp+JqMn6jg9G9MOtYvMt5ylwi0CEY=; b=Ql43Edc8LDkW9n3VvXrxuymV+XLRl6QAZswaZRHY59m8OjgJp1gwZivlZOkT70fKe/ PVnCSfuL4jKGInt96sJnVILt0+ub2nMulPbUWk5VvwE00sXPVxBUzOlWDkdHiQZk/BHq Fbl4ZIRW9HwDkowby6eeNJSBquots2+FdGURxPmyb4XdNhewMoUXse0txQ1nrKT6IfVQ MDZ9uq4Y5Wy3PWxh2F1Qbpx6kikafaNSUzy+UzKGiFuYk3uG2p8vqRvdBALqbdD2em6j 7DQ3iKKRVHrQlcYdEo4KIIvVWl5CsUDOjHNlIyqXg50Su84PwquHqDp9lwS+/DWkhbXa OVsQ== X-Gm-Message-State: APt69E25bzsgW/LI2CnGdc6WQR1sa9ecVQ+GovBZLKxerSDpBlx989fP KyRXIYjvEo2S89PKlEl9qldNRw== X-Google-Smtp-Source: AAOMgpcXHoziv1KQl1Lt57sNVHex6iod1SHlysDe9kqbefaXAw2HMBKbzeHZqhdWJ72sCn+v/GX/AQ== X-Received: by 2002:adf:f6c4:: with SMTP id y4-v6mr12275404wrp.4.1530286552049; Fri, 29 Jun 2018 08:35:52 -0700 (PDT) Original-Received: from dell.homenet (158.14.113.87.dyn.plus.net. [87.113.14.158]) by smtp.gmail.com with ESMTPSA id g88-v6sm2488322wmc.27.2018.06.29.08.35.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 08:35:51 -0700 (PDT) Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with SMTP id 7447C428C9C; Fri, 29 Jun 2018 16:35:49 +0100 (BST) In-Reply-To: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 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:19568 Archived-At: On Fri, 29 Jun 2018 12:34:07 +0200 Hans =C5berg wrote: > > 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, perh= aps 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 >=20 > Yes, I saw that, too. It is important to ensure two's complement, too, wh= ich the other types do not. >=20 > > If, say, uint8_t is available in stdint.h for C, it > > will be available for C++. =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 ". >=20 > Which C version? In g++7, __STDC_VERSION__ is not defined, only __STDC__. In C++17, references to "C" are to ISO/IEC 9899:2011. References to the C standard library are to "the library described in Clause 7 of ISO/IEC 9899:2011". In C++11 and C++14, the references are to ISO/IEC 9899:1999. By default (if you don't use the -std=3Dc++xx flag) g++-7 compiles according to C++14.