bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Portability issues of inline on macOS with GCC11


From: Bruno Haible
Subject: Re: Portability issues of inline on macOS with GCC11
Date: Mon, 13 Sep 2021 07:30:01 +0200

Akim Demaille wrote:
> The preprocessed source is
> 
> > static [[__maybe_unused__]] void *xnrealloc (void *p, size_t n, size_t s)
> >   __attribute__ ((__alloc_size__ (2, 3)));
> > static [[__maybe_unused__]] void *
> > xnrealloc (void *p, size_t n, size_t s)
> > {
> >   return xreallocarray (p, n, s);
> > }

Thanks for the report. This patch should fix it.


2021-09-13  Bruno Haible  <bruno@clisp.org>

        extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
        Reported by Akim Demaille in
        <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00052.html>.
        * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED
        before, not after, 'static'.

diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index a2acf126c..94443f212 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -83,8 +83,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
 # define _GL_EXTERN_INLINE extern
 # define _GL_EXTERN_INLINE_IN_USE
 #else
-# define _GL_INLINE static _GL_UNUSED
-# define _GL_EXTERN_INLINE static _GL_UNUSED
+# define _GL_INLINE _GL_UNUSED static
+# define _GL_EXTERN_INLINE _GL_UNUSED static
 #endif
 
 /* In GCC 4.6 (inclusive) to 5.1 (exclusive),






reply via email to

[Prev in Thread] Current Thread [Next in Thread]