diff options
| author | Paul Eggert | 2013-07-01 16:43:19 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-01 16:43:19 -0700 |
| commit | aaea7495957f5b82fe4e1c8a90a8d96cd77c0001 (patch) | |
| tree | aad1d58e24582aca9744e8c51ad1d514e1a5615f /lib/ignore-value.h | |
| parent | ab71f1741c2583d2ae7c753743fc5da49a5ad093 (diff) | |
| download | emacs-aaea7495957f5b82fe4e1c8a90a8d96cd77c0001.tar.gz emacs-aaea7495957f5b82fe4e1c8a90a8d96cd77c0001.zip | |
Merge from gnulib.
This incorporates:
2013-06-23 ignore-value: port to gcc -pedantic
2013-06-21 extern-inline: port to gcc -std=c89
Diffstat (limited to 'lib/ignore-value.h')
| -rw-r--r-- | lib/ignore-value.h | 13 |
1 files changed, 7 insertions, 6 deletions
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 @@ | |||
| 33 | declared with attribute warn_unused_result". */ | 33 | declared with attribute warn_unused_result". */ |
| 34 | 34 | ||
| 35 | #ifndef _GL_IGNORE_VALUE_H | 35 | #ifndef _GL_IGNORE_VALUE_H |
| 36 | # define _GL_IGNORE_VALUE_H | 36 | #define _GL_IGNORE_VALUE_H |
| 37 | 37 | ||
| 38 | /* The __attribute__((__warn_unused_result__)) feature | 38 | /* The __attribute__((__warn_unused_result__)) feature |
| 39 | is available in gcc versions 3.4 and newer, | 39 | is available in gcc versions 3.4 and newer, |
| 40 | while the typeof feature has been available since 2.7 at least. */ | 40 | while the typeof feature has been available since 2.7 at least. */ |
| 41 | # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) | 41 | #if 3 < __GNUC__ + (4 <= __GNUC_MINOR__) |
| 42 | # define ignore_value(x) ((void) (x)) | 42 | # define ignore_value(x) \ |
| 43 | # else | 43 | (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; })) |
| 44 | # define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) | 44 | #else |
| 45 | # endif | 45 | # define ignore_value(x) ((void) (x)) |
| 46 | #endif | ||
| 46 | 47 | ||
| 47 | #endif | 48 | #endif |