[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
extern inline problem with argp when building tar 1.19 with GCC 4.2.1
From: |
Paul Eggert |
Subject: |
extern inline problem with argp when building tar 1.19 with GCC 4.2.1 |
Date: |
Fri, 12 Oct 2007 23:13:26 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
This was Solaris 8 (sparc), though I doubt that matters. Here's the
behavior I observed:
depbase=`echo argp-fmtstream.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -m64 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT
argp-fmtstream.o -MD -MP -MF $depbase.Tpo -c -o argp-fmtstream.o
argp-fmtstream.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from argp-fmtstream.c:32:
argp-fmtstream.h:206: warning: C99 inline functions are not supported;
using GNU89
argp-fmtstream.h:206: warning: to disable this warning use
-fgnu89-inline or the gnu_inline function attribute
argp-fmtstream.h:219: warning: C99 inline functions are not supported;
using GNU89
... and lots more warnings like that.
I installed the following workaround into gnulib for now. I suspect
we might need a better solution in the long run, but this solves the
immediate problem.
2007-10-12 Paul Eggert <address@hidden>
* lib/argp-fmtstream.h (ARGP_FS_EI): Work around GCC 4.2.1 diagnostic
"warning: C99 inline functions are not supported; using GNU89".
--- a/lib/argp-fmtstream.h
+++ b/lib/argp-fmtstream.h
@@ -197,7 +197,13 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs,
size_t __amount);
#endif
#ifndef ARGP_FS_EI
-#define ARGP_FS_EI extern inline
+# if __GNUC_GNU_INLINE__
+# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
+# elif __GNUC__
+# define ARGP_FS_EI extern inline
+# else
+# define ARGP_FS_EI inline
+# endif
#endif
ARGP_FS_EI size_t
- extern inline problem with argp when building tar 1.19 with GCC 4.2.1,
Paul Eggert <=