diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-11-27 14:52:17 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-11-27 14:52:42 -0800 |
commit | fd27e50d9f01023121aa5d01fb24d8e7dd39392a (patch) | |
tree | 035ccc7f4508880af0dca3de9919f86f161ca129 /lib/ignore-value.h | |
parent | 54c3ba61dfdf260865f2a6529ab414e24da17cf5 (diff) | |
download | gnulib-fd27e50d9f01023121aa5d01fb24d8e7dd39392a.tar.gz |
ignore-value: prefer GCC version back through 2.0
The code didn't match the comments, so I did a bit of software
archaeology. GCC 2.0 seems to support __extension__ and
__typeof__, so fix both code and comments to use 2.0.
* lib/ignore-value.h (ignore_value): Use __extension__ and
__typeof__ for GCC 2.0 through 3.3, too.
Diffstat (limited to 'lib/ignore-value.h')
-rw-r--r-- | lib/ignore-value.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ignore-value.h b/lib/ignore-value.h index ebd6bf42f5..f079a0629a 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h @@ -35,10 +35,10 @@ #ifndef _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 3 < __GNUC__ + (4 <= __GNUC_MINOR__) +/* The __attribute__((__warn_unused_result__)) feature is available in + gcc versions 3.4 and newer, while __typeof__ and __extension__ have + been available since 2.0 at least. */ +#if 2 <= __GNUC__ # define ignore_value(x) \ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; })) #else |