diff options
author | Bruno Haible <bruno@clisp.org> | 2007-09-09 02:05:32 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-09-09 02:05:32 +0000 |
commit | fc599936bd0c63b02544482453756917eb91ef8f (patch) | |
tree | 45675507ed53f43b8256c07c6df6d1b7eac364c0 | |
parent | 597eaaa4ab1ca547355707ba451780d16999e2ad (diff) | |
download | gperf-fc599936bd0c63b02544482453756917eb91ef8f.tar.gz |
Change generated code to avoid a warning by GCC 4.2.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/output.cc | 10 | ||||
-rw-r--r-- | tests/c-parse.exp | 2 | ||||
-rw-r--r-- | tests/charsets.exp | 2 | ||||
-rw-r--r-- | tests/chill.exp | 2 | ||||
-rw-r--r-- | tests/cplusplus.exp | 2 | ||||
-rw-r--r-- | tests/gpc.exp | 2 | ||||
-rw-r--r-- | tests/incomplete.exp | 2 | ||||
-rw-r--r-- | tests/java.exp | 2 | ||||
-rw-r--r-- | tests/languages.exp | 2 | ||||
-rw-r--r-- | tests/modula2.exp | 2 | ||||
-rw-r--r-- | tests/objc.exp | 2 | ||||
-rw-r--r-- | tests/permut2.exp | 2 | ||||
-rw-r--r-- | tests/permut3.exp | 2 | ||||
-rw-r--r-- | tests/permutc2.exp | 2 | ||||
-rw-r--r-- | tests/test-4.exp | 2 |
16 files changed, 35 insertions, 16 deletions
@@ -1,5 +1,18 @@ 2007-09-08 Bruno Haible <bruno@clisp.org> + Change generated code to avoid a warning by GCC 4.2 that the meaning + of __inline will be changed (!). + * src/output.cc (Output::output_lookup_function): Emit the inline + marker also for gcc-4.2 in c99 mode. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + Reported by Jim Meyering <jim@meyering.net>. + +2007-09-08 Bruno Haible <bruno@clisp.org> + Allow creating the HTML documentation with texi2html or makeinfo. * doc/texi2html: New file, from GNU gettext. * doc/Makefile.in (TEXI2HTML): Invoke it. 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"); diff --git a/tests/c-parse.exp b/tests/c-parse.exp index f7c695b..b4ae2a2 100644 --- a/tests/c-parse.exp +++ b/tests/c-parse.exp @@ -199,7 +199,7 @@ static struct resword wordlist[] = #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/charsets.exp b/tests/charsets.exp index bfbf056..86a959c 100644 --- a/tests/charsets.exp +++ b/tests/charsets.exp @@ -1805,7 +1805,7 @@ static const struct charset wordlist[] = #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/chill.exp b/tests/chill.exp index 243e91b..4c9b3ca 100644 --- a/tests/chill.exp +++ b/tests/chill.exp @@ -178,7 +178,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/cplusplus.exp b/tests/cplusplus.exp index 78e6fb0..daef218 100644 --- a/tests/cplusplus.exp +++ b/tests/cplusplus.exp @@ -103,7 +103,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/gpc.exp b/tests/gpc.exp index 5265492..423c278 100644 --- a/tests/gpc.exp +++ b/tests/gpc.exp @@ -94,7 +94,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/incomplete.exp b/tests/incomplete.exp index d887dc4..04dc088 100644 --- a/tests/incomplete.exp +++ b/tests/incomplete.exp @@ -84,7 +84,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/java.exp b/tests/java.exp index 8ba6cc1..4eb41cb 100644 --- a/tests/java.exp +++ b/tests/java.exp @@ -121,7 +121,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/languages.exp b/tests/languages.exp index fa27dc8..aee3ce8 100644 --- a/tests/languages.exp +++ b/tests/languages.exp @@ -1462,7 +1462,7 @@ static const struct language wordlist[] = #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/modula2.exp b/tests/modula2.exp index 27459b0..fe859a1 100644 --- a/tests/modula2.exp +++ b/tests/modula2.exp @@ -111,7 +111,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/objc.exp b/tests/objc.exp index 76a0d82..053f59c 100644 --- a/tests/objc.exp +++ b/tests/objc.exp @@ -97,7 +97,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/permut2.exp b/tests/permut2.exp index ffba7bf..d5d710f 100644 --- a/tests/permut2.exp +++ b/tests/permut2.exp @@ -83,7 +83,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/permut3.exp b/tests/permut3.exp index 9232ce2..94d0b1d 100644 --- a/tests/permut3.exp +++ b/tests/permut3.exp @@ -83,7 +83,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/permutc2.exp b/tests/permutc2.exp index d9c94ce..1fcdbbc 100644 --- a/tests/permutc2.exp +++ b/tests/permutc2.exp @@ -130,7 +130,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/tests/test-4.exp b/tests/test-4.exp index 4a13a6f..34f5f94 100644 --- a/tests/test-4.exp +++ b/tests/test-4.exp @@ -85,7 +85,7 @@ hash (str, len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif |