From unknown Mon Jun 16 23:48:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24494 <24494@debbugs.gnu.org> To: bug#24494 <24494@debbugs.gnu.org> Subject: Status: 24.4; Trailing comma in emacs-module.h Reply-To: bug#24494 <24494@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:48:18 +0000 retitle 24494 24.4; Trailing comma in emacs-module.h reassign 24494 emacs submitter 24494 Christopher Wellons severity 24494 wishlist tag 24494 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 11:23:25 2016 Received: (at submit) by debbugs.gnu.org; 21 Sep 2016 15:23:25 +0000 Received: from localhost ([127.0.0.1]:59713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmjMr-0002DN-0b for submit@debbugs.gnu.org; Wed, 21 Sep 2016 11:23:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmjMp-0002DB-RX for submit@debbugs.gnu.org; Wed, 21 Sep 2016 11:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmjMf-00034X-6B for submit@debbugs.gnu.org; Wed, 21 Sep 2016 11:23:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmjMf-00033t-2n for submit@debbugs.gnu.org; Wed, 21 Sep 2016 11:23:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmjMd-0002mJ-3J for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 11:23:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmjMZ-00031I-2w for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 11:23:11 -0400 Received: from mail.nullprogram.com ([192.241.191.137]:42652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmjMY-0002xx-VD for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 11:23:07 -0400 Received: from localhost ([127.0.0.1] helo=wellocc1-ares.jhuapl.edu) by mail.nullprogram.com with esmtp (Exim 4.84_2) (envelope-from ) id 1bmjMQ-0005C7-BG; Wed, 21 Sep 2016 11:22:59 -0400 From: Christopher Wellons To: bug-gnu-emacs@gnu.org Subject: 24.4; Trailing comma in emacs-module.h Tags: patch Date: Wed, 21 Sep 2016 11:22:57 -0400 Message-ID: <87fuotnupa.fsf@wellocc1-ares.jhuapl.edu> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Building Emacs itself now requires a C99 compiler, but this requirement needn't extend to dynamic modules. Removing a trailing comma (see patch) makes emacs-module.h C89/C90 compatible, allowing modules to be built using older C compilers. Trailing commas weren't permitted until C99. diff --git a/src/emacs-module.h b/src/emacs-module.h --- a/src/emacs-module.h +++ b/src/emacs-module.h @@ -67,7 +67,7 @@ enum emacs_funcall_exit emacs_funcall_exit_signal = 1, /* Function has exit using `throw'. */ - emacs_funcall_exit_throw = 2, + emacs_funcall_exit_throw = 2 }; struct emacs_env_25 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 12 17:36:09 2016 Received: (at 24494) by debbugs.gnu.org; 12 Dec 2016 22:36:09 +0000 Received: from localhost ([127.0.0.1]:39698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGZCa-0003WT-VG for submit@debbugs.gnu.org; Mon, 12 Dec 2016 17:36:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGZCZ-0003WE-Bs for 24494@debbugs.gnu.org; Mon, 12 Dec 2016 17:36:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGZCT-0001SL-4f for 24494@debbugs.gnu.org; Mon, 12 Dec 2016 17:36:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGZCM-0001Qq-02; Mon, 12 Dec 2016 17:35:54 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cGZCL-0006g1-Ii; Mon, 12 Dec 2016 17:35:53 -0500 From: Glenn Morris To: Christopher Wellons Subject: Re: bug#24494: 24.4; Trailing comma in emacs-module.h References: <87fuotnupa.fsf@wellocc1-ares.jhuapl.edu> X-Spook: Torreon insurgency 9705 Samford Road asset Operation X-Ran: "F/tP@42Tk~_BH*6"CiY/Wf`k7MY)v)Xm$D66q:h!V"lf4_a7MD|'Mz}vPcbev~tfZa.:M X-Hue: cyan X-Attribution: GM Date: Mon, 12 Dec 2016 17:35:53 -0500 In-Reply-To: <87fuotnupa.fsf@wellocc1-ares.jhuapl.edu> (Christopher Wellons's message of "Wed, 21 Sep 2016 11:22:57 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.1 (--------) X-Debbugs-Envelope-To: 24494 Cc: 24494@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.1 (--------) Christopher Wellons wrote: > Building Emacs itself now requires a C99 compiler, but this requirement > needn't extend to dynamic modules. Removing a trailing comma (see patch) > makes emacs-module.h C89/C90 compatible, allowing modules to be built > using older C compilers. Trailing commas weren't permitted until C99. Thanks for the report. I don't have an opinion, but some comments: 1) I think it's going to be hard for developers to remember to use different conventions for emacs-module.h, so C99-isms are likely to creep back in. 2) Are people really likely to be building Emacs modules with set-ups that can't build Emacs itself? 3) It seems this feature was supported by gcc since 0.9? Ie, forever? https://www.gnu.org/software/gcc/c99status.html Hopefully someone who does have an opinion will quickly either fix or wontfix this issue. :) > diff --git a/src/emacs-module.h b/src/emacs-module.h > --- a/src/emacs-module.h > +++ b/src/emacs-module.h > @@ -67,7 +67,7 @@ enum emacs_funcall_exit > emacs_funcall_exit_signal = 1, > > /* Function has exit using `throw'. */ > - emacs_funcall_exit_throw = 2, > + emacs_funcall_exit_throw = 2 > }; > > struct emacs_env_25 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 16:49:28 2017 Received: (at 24494) by debbugs.gnu.org; 1 Jul 2017 20:49:28 +0000 Received: from localhost ([127.0.0.1]:48012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRPKa-0001Ng-16 for submit@debbugs.gnu.org; Sat, 01 Jul 2017 16:49:28 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:36907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRPKY-0001NO-0m; Sat, 01 Jul 2017 16:49:26 -0400 Received: by mail-it0-f50.google.com with SMTP id m84so40227045ita.0; Sat, 01 Jul 2017 13:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=e27WXrBS2mYj3Go+Gd53iZR8Urv4yKHq9wA6cGt3L7c=; b=mWErzY2FLE3meR6cbQBvmXmzGZ7tBlaTGXPY30qM54VtePhlgD42mFJrcL2N1v9r74 Yqm3of8duEaxUcQ+VBLplVb56Uy2gMVb8NvtoVEW809R0tvJknwB9cFIcLpShobHV7E1 r0mJdDzwKG9glqIYJnabzdltqkMw4O8xDiGcmlw6Qn2AEaRtSjGDO/WP8J+AAwSzshPo o0QZCSfEgxiFTPwVPRKCo8nGYB6Bv6feD5TSpfayx5teZfW5R+1260ievDNwtH4i+GkH wU0wl8pnb2O3AwQjn5nUdHBgBFQODabm7TqJl4vKCDKshHKcQm7dQQYdJUMqF+1VZHjP 85Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=e27WXrBS2mYj3Go+Gd53iZR8Urv4yKHq9wA6cGt3L7c=; b=GZBqvFrosh7akxCRtvqwWaYkd29ombaA/16wFT+PIdBrIZDp4hS1OFWyfcfxFLbpe9 nI2T0s3DmGx2t/yaKxSk4WrdeAD4SLeXXHjlC1rHua5KOS/Ns1r6zPph+1jzD0MzLQ/4 Jo6ag+85i02XuB22bblKVY/RIVFFQO5E3k/5VVglXCqiRzHP8xIXZ8UfMJmdEnHbGOdR v/kcHGtesMdbl3AZ7g3WEpa1MU2qAW7k4u83+l/kQ+0xVfgc1WtC1LUhcHOjdsHL2zWS Ky6Qv7QvdaWuV26p0WZxC4DvszLrZZds5NVQ7slGXnVsqC7wq5kz2moknqLDzeOj8iiO xjjg== X-Gm-Message-State: AKS2vOyKqf4gPa69qRp0EYG9zaHd7qHybCTIe7CT3LhzqeTk15uqAv2L KeDr84NZFwXjt7i6 X-Received: by 10.36.94.10 with SMTP id h10mr26223088itb.103.1498942160030; Sat, 01 Jul 2017 13:49:20 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id q70sm2069965itb.1.2017.07.01.13.49.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Jul 2017 13:49:19 -0700 (PDT) From: npostavs@users.sourceforge.net To: Glenn Morris Subject: Re: bug#24494: 24.4; Trailing comma in emacs-module.h References: <87fuotnupa.fsf@wellocc1-ares.jhuapl.edu> Date: Sat, 01 Jul 2017 16:50:55 -0400 In-Reply-To: (Glenn Morris's message of "Mon, 12 Dec 2016 17:35:53 -0500") Message-ID: <877ezrlw40.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 24494 Cc: Christopher Wellons , 24494@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) tags 24494 fixed close 24494 26.1 quit Glenn Morris writes: > Christopher Wellons wrote: > >> Building Emacs itself now requires a C99 compiler, but this requirement >> needn't extend to dynamic modules. Removing a trailing comma (see patch) >> makes emacs-module.h C89/C90 compatible, allowing modules to be built >> using older C compilers. Trailing commas weren't permitted until C99. > > Thanks for the report. I don't have an opinion, but some comments: > > 1) I think it's going to be hard for developers to remember to use > different conventions for emacs-module.h, so C99-isms are likely to > creep back in. > > 2) Are people really likely to be building Emacs modules with set-ups > that can't build Emacs itself? > > 3) It seems this feature was supported by gcc since 0.9? Ie, forever? > https://www.gnu.org/software/gcc/c99status.html > > Hopefully someone who does have an opinion will quickly either fix or > wontfix this issue. :) This has now been done in [1: 0489f2ca5a]. [1: 0489f2ca5a]: 2017-07-01 20:02:24 +0200 Improve C++98 compatibility http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0489f2ca5a01445d3abb39aea18d54257fedd5f1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 02 11:29:14 2017 Received: (at 24494) by debbugs.gnu.org; 2 Jul 2017 15:29:14 +0000 Received: from localhost ([127.0.0.1]:48925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRgoD-0005gs-Lq for submit@debbugs.gnu.org; Sun, 02 Jul 2017 11:29:13 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:32806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRgoB-0005ge-H2 for 24494@debbugs.gnu.org; Sun, 02 Jul 2017 11:29:11 -0400 Received: by mail-oi0-f49.google.com with SMTP id p188so66737417oia.0 for <24494@debbugs.gnu.org>; Sun, 02 Jul 2017 08:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JljFlbKQEys+NbKwhuDRTGCmMK68YyNRTAR4shHJ5qo=; b=PdqJXgzvzUW61Yt3K+a94wo9kqo+JbQi9R33Fk26Zh8lpzZz60Z46C91/bF6Xo+LG1 LRwCPOh0a71KrAQ9weH+1kOXV/UOMafQqdKiyAItnVC6XEgNCwQdcFuy8ZjU0rBSxVLY kwOWTGMZjx+AqQzOf995xDr3uAmQ4z98tpeoFao5itqe7l6nFEGbePLA5zafVWamJX6V zAQVXzTOUc8vQPLo8ohbSPSaNbz+NlVpMwrbkjgfY7VxXKeRcI640gmt/WxkDcMIhIdx OaRd4MbiPt8h4wziF/ho0NDNNXCp4+aU8EhILsDL1AYrb/RIpTahO9JXgAtYSrSMfVJ4 5F/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JljFlbKQEys+NbKwhuDRTGCmMK68YyNRTAR4shHJ5qo=; b=tHfeXKeBazsC0CpRHQJg8GDn/JZiLFvBsbbDAwW+k95JNi6PZ2XpmYxrhXOZJZlZQs /Txhts9jSod/gVv5ycziRMA32XFnfriRyqL5RosRpqMZQ7xWrVFJiDJEHLBFMGvJo82d seO6WpKG+LCd1v1mZGwT3TLU6/sOMWI+oFsN9zj/AxihQIUpZ1H/Zl+xDU/hpCTOHQZX LBBsmrM6YcbjamD7n96BPfxKEUGkGwn+kOoRI3c3WUTs/hwgX5+sjxsf5ALxZnj/1xlO TSbCdOcGEFKk6E86Df2KjdnUI6bw1iLGHwvQnWFOl4xP67gu5wcWnzeTZx3PatlzOHSS RJnQ== X-Gm-Message-State: AKS2vOyFt1/47pTa3uDj+j3zakeYxv5OVBJD/8FZCvWdB6Eoa5jV6+aV V3k3d7XG31lMDfFTyL7IzsVU4JxmSw== X-Received: by 10.202.224.70 with SMTP id x67mr15882607oig.75.1499009345665; Sun, 02 Jul 2017 08:29:05 -0700 (PDT) MIME-Version: 1.0 References: <87fuotnupa.fsf@wellocc1-ares.jhuapl.edu> In-Reply-To: From: Philipp Stephani Date: Sun, 02 Jul 2017 15:28:55 +0000 Message-ID: Subject: Re: bug#24494: 24.4; Trailing comma in emacs-module.h To: Glenn Morris , Christopher Wellons Content-Type: multipart/alternative; boundary="001a113d38a09041030553574fec" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24494 Cc: 24494@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --001a113d38a09041030553574fec Content-Type: text/plain; charset="UTF-8" Glenn Morris schrieb am Mo., 12. Dez. 2016 um 23:37 Uhr: > Christopher Wellons wrote: > > > Building Emacs itself now requires a C99 compiler, but this requirement > > needn't extend to dynamic modules. Removing a trailing comma (see patch) > > makes emacs-module.h C89/C90 compatible, allowing modules to be built > > using older C compilers. Trailing commas weren't permitted until C99. > > Thanks for the report. I don't have an opinion, but some comments: > > 1) I think it's going to be hard for developers to remember to use > different conventions for emacs-module.h, so C99-isms are likely to > creep back in. > emacs-module.h is used differently than other parts of the source code, so different conventions apply: It should be more compatible with various compilers, it has to be compatible with C++, all names have to start with "emacs_", it can't depend on any headers not in the standard library, etc. If it's hard to remember these requirements, maybe we should check for them? E.g. add a unit test that including emacs-module.h always works, even with '-pedantic-errors -Weverything -Werror -std=c++98'. Aside: technically emacs-module.h already depends on C99/C++11, via intmax_t and bool. However, these types are apparently often available even in C++98/C89 mode. > > 2) Are people really likely to be building Emacs modules with set-ups > that can't build Emacs itself? > Why not? Modules could be much simpler than Emacs, and module authors might legitimately want to support older compilers. > > 3) It seems this feature was supported by gcc since 0.9? Ie, forever? > https://www.gnu.org/software/gcc/c99status.html > > Hopefully someone who does have an opinion will quickly either fix or > wontfix this issue. :) > I've independently just pushed the same change. I think not breaking pre-C++11 builds (which probably still see signifcant use) is important enough. --001a113d38a09041030553574fec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Glenn = Morris <rgm@gnu.org> schrieb am Mo= ., 12. Dez. 2016 um 23:37=C2=A0Uhr:
Christopher Wellons wrote:

> Building Emacs itself now requires a C99 compiler, but this requiremen= t
> needn't extend to dynamic modules. Removing a trailing comma (see = patch)
> makes emacs-module.h C89/C90 compatible, allowing modules to be built<= br> > using older C compilers. Trailing commas weren't permitted until C= 99.

Thanks for the report. I don't have an opinion, but some comments:

1) I think it's going to be hard for developers to remember to use
different conventions for emacs-module.h, so C99-isms are likely to
creep back in.

emacs-module.h is used d= ifferently than other parts of the source code, so different conventions ap= ply: It should be more compatible with various compilers, it has to be comp= atible with C++, all names have to start with "emacs_", it can= 9;t depend on any headers not in the standard library, etc.
If it= 's hard to remember these requirements, maybe we should check for them?= E.g. add a unit test that including emacs-module.h always works, even with= '-pedantic-errors -Weverything -Werror -std=3Dc++98'.
As= ide: technically emacs-module.h already depends on C99/C++11, via intmax_t = and bool. However, these types are apparently often available even in C++98= /C89 mode.
=C2=A0

2) Are people really likely to be building Emacs modules with set-ups
that can't build Emacs itself?

Why = not? Modules could be much simpler than Emacs, and module authors might leg= itimately want to support older compilers.
=C2=A0

3) It seems this feature was supported by gcc since 0.9? Ie, forever?
https://www.gnu.org/software/gcc/c99status.html
Hopefully someone who does have an opinion will quickly either fix or
wontfix this issue. :)

I've independently just pushed the sam= e change. I think not breaking pre-C++11 builds (which probably still see s= ignifcant use) is important enough.
--001a113d38a09041030553574fec-- From unknown Mon Jun 16 23:48:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 31 Jul 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator