[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gperf under version control?
From: |
Bruno Haible |
Subject: |
Re: gperf under version control? |
Date: |
Sun, 9 Sep 2007 04:05:45 +0200 |
User-agent: |
KMail/1.5.4 |
Hello Jim,
> BTW,
> As you probably know, the sourceforge gperf-bugs list is useless.
> All it gets is spam.
Yes, this is why bug-gnu-gperf was created on the GNU side recently.
> Have you considered moving the sources and mailing list to savannah?
> There, the lists are essentially guaranteed to be spam-free,
> and you can use git.
The mailing list is already on lists.gnu.org now (i.e. it's a mail alias
that redirects to bug-gnu-utils).
Regarding the sources, sourceforge's CVS service is acceptable, for the
small use that gperf makes of it.
> gcc-4.1.2 has the same problem:
I reproduce the problem with gcc-4.2.1 and -4.2.0, but not with -4.1.2.
> gcc -std=gnu99 defines __GNUC_GNU_INLINE__, yet
> warns about the __inline unless you use the attribute:
>
> gcc -O -std=gnu99 -dM -E - < /dev/null |grep _INLINE__
> #define __GNUC_GNU_INLINE__ 1
>
> Here's a stand-alone example of the warning:
>
> $ echo 'inline int f(void) {return 1;}' > k.c
> $ gcc -O -std=gnu99 -Wall -c k.c
> k.c:1: warning: C99 inline functions are not supported; using GNU89
> k.c:1: warning: to disable this warning use -fgnu89-inline or the
> gnu_inline function attribute
Thanks for the code sample.
The warning occurs also without -Wall. Just -std=gnu99 is sufficient to get
it.
This version of gcc supports only one semantic of "inline", the older GNU one.
There are two ways to write it:
- inline --> generates a warning
- inline __attribute__ ((__gnu_inline__)) --> no warning
I understand that the purpose is to make users change their programs when
they are using gcc-4.2 and don't have yet access to gcc-4.3.
> Here's the change I made to avoid the warning:
>
> 2007-09-05 Jim Meyering <address@hidden>
>
> * src/output.cc (Output::output_lookup_function): Emit code to test
> for __GNUC_GNU_INLINE__ as well as for __GNUC_STDC_INLINE__.
> This avoids warnings from gcc -Wall.
The alternative is to change autoconf to append "-std=gnu99 -fgnu89-inline"
instead of "-std=gnu99" when gcc's version is 4.2.x (but not for 4.3.x!).
But this defeats the purpose of the warning: to help people change their
code before gcc-4.3 comes out. Therefore I'm applying your patch, with
more explanations in comments, and an update of the test suite.
Thanks!
Bruno