extern-inline: port to gcc -std=c89
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Jun 2013 19:33:40 +0000 (12:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Jun 2013 19:34:21 +0000 (12:34 -0700)
* m4/extern-inline.m4 (gl_EXTERN_INLINE):
Do not use __gnu_inline__ if pedantic and pre-C99.

ChangeLog
m4/extern-inline.m4

index 5e4f02f..ce43380 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       extern-inline: port to gcc -std=c89
+       * m4/extern-inline.m4 (gl_EXTERN_INLINE):
+       Do not use __gnu_inline__ if pedantic and pre-C99.
+
 2013-06-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        doc: document extern-inline
index 4e801e3..c4c5e7f 100644 (file)
@@ -31,7 +31,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
      && !defined __APPLE__)
 # define _GL_INLINE inline
 # define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined __APPLE__)
 # if __GNUC_GNU_INLINE__
    /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
 #  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))