summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-07-01 16:43:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-07-01 16:43:19 -0700
commitaaea7495957f5b82fe4e1c8a90a8d96cd77c0001 (patch)
treeaad1d58e24582aca9744e8c51ad1d514e1a5615f
parentab71f1741c2583d2ae7c753743fc5da49a5ad093 (diff)
downloademacs-aaea7495957f5b82fe4e1c8a90a8d96cd77c0001.tar.gz
Merge from gnulib.
This incorporates: 2013-06-23 ignore-value: port to gcc -pedantic 2013-06-21 extern-inline: port to gcc -std=c89
-rw-r--r--ChangeLog4
-rw-r--r--lib/ignore-value.h13
-rw-r--r--m4/extern-inline.m43
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 301e912f4d3..7610b19290f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
+ Merge from gnulib, incorporating:
+ 2013-06-23 ignore-value: port to gcc -pedantic
+ 2013-06-21 extern-inline: port to gcc -std=c89
+
Do not use GTK 3 if it exists but cannot be compiled.
* configure.ac: Leave GTK_OBJ and term_header alone if GTK 3
exists but cannot be compiled.
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index 63ecde85136..ebd6bf42f56 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -33,15 +33,16 @@
declared with attribute warn_unused_result". */
#ifndef _GL_IGNORE_VALUE_H
-# define _GL_IGNORE_VALUE_H
+#define _GL_IGNORE_VALUE_H
/* The __attribute__((__warn_unused_result__)) feature
is available in gcc versions 3.4 and newer,
while the typeof feature has been available since 2.7 at least. */
-# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
-# define ignore_value(x) ((void) (x))
-# else
-# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
-# endif
+#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
+# define ignore_value(x) \
+ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
+#else
+# define ignore_value(x) ((void) (x))
+#endif
#endif
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 4e801e31f41..c4c5e7f221b 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -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__))