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 10:39:33 +0200 Message-ID: <7E46C070-8ABF-430E-8ACD-6FDE07AD84AF@telia.com> References: <8736xd45zc.fsf@pobox.com> <877emi2g9q.fsf@pobox.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=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530261463 8675 195.159.176.226 (29 Jun 2018 08:37:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2018 08:37:43 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 29 10:37:38 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 1fYouQ-00029c-OT for guile-devel@m.gmane.org; Fri, 29 Jun 2018 10:37:38 +0200 Original-Received: from localhost ([::1]:40626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYowW-0005e7-8D for guile-devel@m.gmane.org; Fri, 29 Jun 2018 04:39:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYowR-0005e1-Cs for guile-devel@gnu.org; Fri, 29 Jun 2018 04:39:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYowN-0008Vo-DY for guile-devel@gnu.org; Fri, 29 Jun 2018 04:39:43 -0400 Original-Received: from v-smtpout1.han.skanova.net ([81.236.60.154]:35410) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYowN-0008T1-5m for guile-devel@gnu.org; Fri, 29 Jun 2018 04:39:39 -0400 Original-Received: from [10.0.1.4] ([90.227.203.185]) by cmsmtp with ESMTPA id YowIf8resqklnYowIfG88w; Fri, 29 Jun 2018 10:39:36 +0200 In-Reply-To: <877emi2g9q.fsf@pobox.com> X-Mailer: Apple Mail (2.3445.8.2) X-CMAE-Envelope: MS4wfPrFeoV8ElG/wrEXoz/XwdAcWgbePk1iSf62qfpWtl8b0Vl79WhOA6qe44capip10AsxfrePKYkjcEBVZukREzYmpXZOY7MKg8u9KWLQD+UoGVueCNnh 5lTteMfb4Dimf5tY+RXESHVMuat/axuxkn1tCye/y3QgnIso0PzADlR28ZBtuwit/IoBDFek2UveaA== 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:19564 Archived-At: > On 29 Jun 2018, at 09:39, Andy Wingo wrote: >=20 > It would seem that the first four > features of C99 are OK for all platforms that we target, with the > following caveats: >=20 > * We should avoid using C++ keywords (e.g. throw) in Guile API files. >=20 > * We might want to avoid mixed decls and statements in inline = functions > in Guile API files. >=20 > We should probably avoid stdbool.h and compound literals, for C++ > reasons. You might make a separate C++ header: It turned out too complicated for = Bison to maintain the compile as C++ generated C parser. > In Guile 3.0 (master branch), the types "scm_t_uint8" and so on are = now > deprecated. My recommendation is that all users switch to use > e.g. "uint8_t", "ptrdiff_t", etc from instead of the > scm_t_uint8, etc definitions that they are now using. The definitions > are compatible on all systems, AFAIU, and on GNU, scm_t_uint8 has long > been a simple typedef for uint8_t. 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. 1. https://en.cppreference.com/w/cpp/types/integer