summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-09-09 02:05:32 +0000
committerBruno Haible <bruno@clisp.org>2007-09-09 02:05:32 +0000
commitfc599936bd0c63b02544482453756917eb91ef8f (patch)
tree45675507ed53f43b8256c07c6df6d1b7eac364c0 /src
parent597eaaa4ab1ca547355707ba451780d16999e2ad (diff)
downloadgperf-fc599936bd0c63b02544482453756917eb91ef8f.tar.gz
Change generated code to avoid a warning by GCC 4.2.
Diffstat (limited to 'src')
-rw-r--r--src/output.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/output.cc b/src/output.cc
index c0c8e6c..98beefe 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -1886,10 +1886,16 @@ Output::output_lookup_function () const
if (option[KRC] | option[C] | option[ANSIC])
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. It defines a macro
- __GNUC_STDC_INLINE__ to indicate this situation. */
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */
printf ("#ifdef __GNUC__\n"
"__inline\n"
- "#ifdef __GNUC_STDC_INLINE__\n"
+ "#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__\n"
"__attribute__ ((__gnu_inline__))\n"
"#endif\n"
"#endif\n");