On 2023-06-09 03:38, Pádraig Brady wrote:

I think this misses xalloc_die due to the "extern"
adjustments in gnulib 3801e9bb67b.
It seems that the perl regexps in the comment need to be adjusted
to cater for the commented /*extern*/

Let's not bother. It's simpler to omit the /*extern*/ as it's just noise in that context. I installed the attached.
From f324566fcefacd84e9f5996f605a0e66482471e5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Fri, 9 Jun 2023 11:13:19 -0700
Subject: [PATCH] xalloc-die: omit /*extern*/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
It complicates syntax checking; see:
https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
Plus, it’s inconsistent style: the other function declarations in
xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
it’s just noise, as is the case here.)
---
 ChangeLog    | 10 ++++++++++
 lib/xalloc.h |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0c7c2fa967..16853a30ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-06-09  Paul Eggert  <egg...@cs.ucla.edu>
+
+	xalloc-die: omit /*extern*/
+	* lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
+	It complicates syntax checking; see:
+	https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
+	Plus, it’s inconsistent style: the other function declarations in
+	xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
+	it’s just noise, as is the case here.)
+
 2023-06-09  Bruno Haible  <br...@clisp.org>
 
 	javaversion: Update comments.
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 0a951e1d59..fb44f420db 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -50,7 +50,7 @@ extern "C" {
    or by using gnulib's xalloc-die module.  This is the
    function to call when one wants the program to die because of a
    memory allocation failure.  */
-/*extern*/ _Noreturn void xalloc_die (void);
+_Noreturn void xalloc_die (void);
 
 #endif /* GNULIB_XALLOC_DIE */
 
-- 
2.39.2

Reply via email to