From aaea7495957f5b82fe4e1c8a90a8d96cd77c0001 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Jul 2013 16:43:19 -0700 Subject: Merge from gnulib. This incorporates: 2013-06-23 ignore-value: port to gcc -pedantic 2013-06-21 extern-inline: port to gcc -std=c89 --- lib/ignore-value.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1