From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: c99 support Date: Fri, 29 Jun 2018 09:39:13 +0200 Message-ID: <877emi2g9q.fsf@pobox.com> References: <8736xd45zc.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1530257850 29185 195.159.176.226 (29 Jun 2018 07:37:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2018 07:37:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: guile-devel@gnu.org To: guile-user@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 29 09:37:25 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 1fYny9-0007Tp-GC for guile-devel@m.gmane.org; Fri, 29 Jun 2018 09:37:25 +0200 Original-Received: from localhost ([::1]:40421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYo0F-0001nM-1P for guile-devel@m.gmane.org; Fri, 29 Jun 2018 03:39:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYo09-0001jo-Gf for guile-devel@gnu.org; Fri, 29 Jun 2018 03:39:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYo06-000473-D9 for guile-devel@gnu.org; Fri, 29 Jun 2018 03:39:29 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:62085 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYo06-00041v-8d; Fri, 29 Jun 2018 03:39:26 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 64142E6781; Fri, 29 Jun 2018 03:39:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=TaHm1ktJsBRmun0VJdLZOSNUk0Y=; b=ankPL+ gJY95i9j3/36JQ3JKZBHqA3LRdx9lqXdkpOaO5MS+2bm3xzP99J5mPRsQUSjId9Z h2DMI75jxcXIQADnp83/5SjG9UAYjUy+1OWPAdzJpqFAJzslEw33cZseqpzd60nZ MpOJZildzwt58lZWHOrAyc1EsqMZUITFdPeLA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=jgepKg+h0Xhz1JxmRy4b5Z5DCVnPHXq9 GhN4Am/17KtzLvr1gIo7Tcoz+a2V5RZ4D16SDQwwD33Vs3Bm/2UKuAw4bkgMOisN QM7J8fBehHlWeQsyX0vXPdDJVRqgXo7BlXdbEoOYZ9gImLk1A+SXLl7LjUxYP0AB IHbLEbZRA4U= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 5CE60E6780; Fri, 29 Jun 2018 03:39:23 -0400 (EDT) Original-Received: from sparrow (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 79332E677E; Fri, 29 Jun 2018 03:39:22 -0400 (EDT) In-Reply-To: <8736xd45zc.fsf@pobox.com> (Andy Wingo's message of "Sat, 23 Jun 2018 22:12:39 +0200") X-Pobox-Relay-ID: 8A4670EE-7B6F-11E8-ABEC-46F7D6707B88-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 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:19562 gmane.lisp.guile.user:14662 Archived-At: On Sat 23 Jun 2018 22:12, Andy Wingo writes: > Is there anyone who compiles Guile with a compiler that does not support > C99? If so, please give platform and compiler. > > I think my questions are limited to, in decreasing order of importance: > > * Is there any system that we target that doesn't have C99 stdint.h > and stddef.h ? > > * Is there any system that we target that doesn't support C99 inline > functions? > > * C99 mixed decls and statements? > > * C99 one-line comments (// foo) ? > > * C99 compound literals? ((struct x) { 1, 2 }) ? > > * stdbool.h > > I would like to use C99 inside Guile, and I want to eventually replace > scm_t_uint8 with uint8_t. Thanks all for the responses. It would seem that the first four features of C99 are OK for all platforms that we target, with the following caveats: * We should avoid using C++ keywords (e.g. throw) in Guile API files. * We might want to avoid mixed decls and statements in inline functions in Guile API files. We should probably avoid stdbool.h and compound literals, for C++ reasons. 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. If you make the change while targetting current Guile (2.2), then you'll won't have deprecation warnings when 3.0 comes out. Cheers, Andy