summaryrefslogtreecommitdiffstats
path: root/gl/m4/extern-inline.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/extern-inline.m4')
-rw-r--r--gl/m4/extern-inline.m417
1 files changed, 10 insertions, 7 deletions
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index 547da82a..4ccc4a95 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,9 +1,10 @@
1# extern-inline.m4 1# extern-inline.m4
2# serial 1 2# serial 2
3dnl Copyright 2012-2024 Free Software Foundation, Inc. 3dnl Copyright 2012-2026 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
7 8
8dnl 'extern inline' a la ISO C99. 9dnl 'extern inline' a la ISO C99.
9 10
@@ -42,9 +43,11 @@ AC_DEFUN([gl_EXTERN_INLINE],
42 functions or macros in standard C headers like <ctype.h>. For example, 43 functions or macros in standard C headers like <ctype.h>. For example,
43 if isdigit is mistakenly implemented via a static inline function, 44 if isdigit is mistakenly implemented via a static inline function,
44 a program containing an extern inline function that calls isdigit 45 a program containing an extern inline function that calls isdigit
45 may not work since the C standard prohibits extern inline functions 46 may not work since C99 through C23 prohibit extern inline functions
46 from calling static functions (ISO C 99 section 6.7.4.(3). 47 from calling static functions (ISO C 23 § 6.7.5 ¶ 3)).
47 This bug is known to occur on: 48 Although a future C standard will likely relax this restriction
49 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3622.txt>,
50 respect it for now. This bug is known to occur on:
48 51
49 OS X 10.8 and earlier; see: 52 OS X 10.8 and earlier; see:
50 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html 53 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
@@ -111,8 +114,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
111 suppress bogus "no previous prototype for 'FOO'" 114 suppress bogus "no previous prototype for 'FOO'"
112 and "no previous declaration for 'FOO'" diagnostics, 115 and "no previous declaration for 'FOO'" diagnostics,
113 when FOO is an inline function in the header; see 116 when FOO is an inline function in the header; see
114 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and 117 <https://gcc.gnu.org/PR54113> and
115 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */ 118 <https://gcc.gnu.org/PR63877>. */
116#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ 119#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
117# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ 120# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
118# define _GL_INLINE_HEADER_CONST_PRAGMA 121# define _GL_INLINE_HEADER_CONST_PRAGMA