diff options
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/extern-inline.m4 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 7f1bb397c4f..0edbe3c81c6 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 | |||
| @@ -74,6 +74,11 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 74 | # define _GL_EXTERN_INLINE static _GL_UNUSED | 74 | # define _GL_EXTERN_INLINE static _GL_UNUSED |
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | /* In GCC, suppress bogus "no previous prototype for 'FOO'" | ||
| 78 | and "no previous declaration for 'FOO'" diagnostics, | ||
| 79 | when FOO is an inline function in the header; see | ||
| 80 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and | ||
| 81 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */ | ||
| 77 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) | 82 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) |
| 78 | # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ | 83 | # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ |
| 79 | # define _GL_INLINE_HEADER_CONST_PRAGMA | 84 | # define _GL_INLINE_HEADER_CONST_PRAGMA |
| @@ -81,10 +86,6 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 81 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ | 86 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ |
| 82 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") | 87 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") |
| 83 | # endif | 88 | # endif |
| 84 | /* Suppress GCC's bogus "no previous prototype for 'FOO'" | ||
| 85 | and "no previous declaration for 'FOO'" diagnostics, | ||
| 86 | when FOO is an inline function in the header; see | ||
| 87 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */ | ||
| 88 | # define _GL_INLINE_HEADER_BEGIN \ | 89 | # define _GL_INLINE_HEADER_BEGIN \ |
| 89 | _Pragma ("GCC diagnostic push") \ | 90 | _Pragma ("GCC diagnostic push") \ |
| 90 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | 91 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ |