[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new extern inline provokes -Wmissing-declarations warnings
From: |
Jim Meyering |
Subject: |
new extern inline provokes -Wmissing-declarations warnings |
Date: |
Sun, 05 Aug 2012 16:27:00 +0200 |
With the latest from gnulib, I get things like this expanded from
timespec.h, and they trigger many -Wmissing-declarations warnings
in coreutils:
#define _GL_TIMESPEC_INLINE _GL_INLINE
# 57 "timespec.h"
inline int
timespec_cmp (struct timespec a, struct timespec b)
{
return (a.tv_sec < b.tv_sec ? -1
: a.tv_sec > b.tv_sec ? 1
: (int) (a.tv_nsec - b.tv_nsec));
}
I have tentatively worked around it with the following,
but would be happy to avoid that commit altogether
if someone fixes the problem in gnulib "real soon":
>From 74f52eafbc39a6f9a5bcbd7266d60e3f1052d7e8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 5 Aug 2012 10:42:53 +0200
Subject: [PATCH] build: temporarily disable -Wmissing-declarations
* configure.ac: Disable -Wmissing-declarations to avoid warnings
from gnulib's newly extern-inline functions.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 5651fd1..0245846 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,11 @@ if test "$gl_gcc_warnings" = yes; then
nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
nw="$nw -Winline" # system.h's
readdir_ignoring_dot_and_dotdot
+ # FIXME temporary 2012-aug work-around for gnulib's new extern inline policy
+ # With that, all of what used to be static-inline functions may now be
+ # "extern inline", in which case they trigger the missing-decl warning.
+ nw="$nw -Wmissing-declarations"
+
# Using -Wstrict-overflow is a pain, but the alternative is worse.
# For an example, see the code that provoked this report:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
--
1.7.12.rc1.10.g97c7934
- new extern inline provokes -Wmissing-declarations warnings,
Jim Meyering <=