You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Stenberg <da...@haxx.se> on 2000/12/19 12:09:40 UTC

-Wredundant-decls

Howdy

The flag -Wredundant-decls is highly annoying on my solaris 2.7 machine using
gcc version 2.8.1, as the system headers seems to declare the same function
(getopt()) multiple times. It gives me no less than 12 warnings on every
source file in libsvn_client (and probably others as well, this module is the
only one I checked and counted in detail).

This flag is only present when I use the --with-maintainer-mode to configure.

This is mostly informational. If the flag makes sense for the more active
developers, then keep it.

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol

Re: -Wredundant-decls

Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote

>> I'd rather see this as an extra configure flag 
>> (--enable-extra-warnings?) instead of making it platform-specific.
> 
> 
> Nah. The "extra flag" is already called --with-maintainer-mode (and yes, we
> should change that to --enable-maintainer-mode; we'd want to do the same
> within APR).

Yeah, I've been meaning to do that for some time, but it always drops to 
the bottom of my list.

> 
> No reason to throw yet more in there. By definition, only developers are
> using it, and we know how to add more flags. And as such, we can throw all
> kinds of stuff in there.

O.K., do it your way.

>> (GCC 3.0 won't emit warnings from headers found in system include 
>> directories (my patch, yeah!), so we /might/ want to make that default 
>> for --enable-maintainer-mode when it's released. But not now.)
> 
> 
> Cool. We can certainly switch on the GCC version to add more flags. (we
> already add those flags only when GCC is being used)

Maybe we could do that now (cc==gcc && gcc --version >= 2.97).


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/

Re: -Wredundant-decls

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Dec 20, 2000 at 07:34:01PM +0100, Branko Cibej wrote:
> Greg Stein wrote:
>...
> > But yes... all that stuff can be annoying. Why don't we take it out for now.
> > I can always add it back in at some future point on a local compile.
> > 
> > Oh... Hmm. I bet that I could come up with a bit of autoconf magic to enable
> > it only on boxes that use glibc. (or at least hardcode to linux boxes at a
> > minimum)
> 
> I'd rather see this as an extra configure flag 
> (--enable-extra-warnings?) instead of making it platform-specific.

Nah. The "extra flag" is already called --with-maintainer-mode (and yes, we
should change that to --enable-maintainer-mode; we'd want to do the same
within APR).

No reason to throw yet more in there. By definition, only developers are
using it, and we know how to add more flags. And as such, we can throw all
kinds of stuff in there.

> (GCC 3.0 won't emit warnings from headers found in system include 
> directories (my patch, yeah!), so we /might/ want to make that default 
> for --enable-maintainer-mode when it's released. But not now.)

Cool. We can certainly switch on the GCC version to add more flags. (we
already add those flags only when GCC is being used)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: -Wredundant-decls

Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:

> I set that the other day as a way to track down issues within SVN itself. It
> "worked fine for me" :-)

Yeah, I know. GNU/Linux is silent, so is Solaris. It probably depends on 
whether the system vendors bothered to #ifdef around possibly redundant 
decls or not.

> But yes... all that stuff can be annoying. Why don't we take it out for now.
> I can always add it back in at some future point on a local compile.
> 
> Oh... Hmm. I bet that I could come up with a bit of autoconf magic to enable
> it only on boxes that use glibc. (or at least hardcode to linux boxes at a
> minimum)

I'd rather see this as an extra configure flag 
(--enable-extra-warnings?) instead of making it platform-specific.

(GCC 3.0 won't emit warnings from headers found in system include 
directories (my patch, yeah!), so we /might/ want to make that default 
for --enable-maintainer-mode when it's released. But not now.)


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/

Re: -Wredundant-decls

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Dec 19, 2000 at 06:26:16PM +0100, Branko Cibej wrote:
> Daniel Stenberg wrote:
> > Howdy
> > 
> > The flag -Wredundant-decls is highly annoying on my solaris 2.7 machine using
> > gcc version 2.8.1, as the system headers seems to declare the same function
> > (getopt()) multiple times. It gives me no less than 12 warnings on every
> > source file in libsvn_client (and probably others as well, this module is the
> > only one I checked and counted in detail).
> > 
> > This flag is only present when I use the --with-maintainer-mode to configure.
> > 
> > This is mostly informational. If the flag makes sense for the more active
> > developers, then keep it.
> 
> Same story on HP-UX and AIX. I think we have to throw -Wredundant-decls 
> out. C allows multiple declarations if they're identical, so I don't see 
> the point of having this warning switched on.

I set that the other day as a way to track down issues within SVN itself. It
"worked fine for me" :-)

But yes... all that stuff can be annoying. Why don't we take it out for now.
I can always add it back in at some future point on a local compile.

Oh... Hmm. I bet that I could come up with a bit of autoconf magic to enable
it only on boxes that use glibc. (or at least hardcode to linux boxes at a
minimum)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: -Wredundant-decls

Posted by Branko Čibej <br...@xbc.nu>.
Daniel Stenberg wrote:

> Howdy
> 
> The flag -Wredundant-decls is highly annoying on my solaris 2.7 machine using
> gcc version 2.8.1, as the system headers seems to declare the same function
> (getopt()) multiple times. It gives me no less than 12 warnings on every
> source file in libsvn_client (and probably others as well, this module is the
> only one I checked and counted in detail).
> 
> This flag is only present when I use the --with-maintainer-mode to configure.
> 
> This is mostly informational. If the flag makes sense for the more active
> developers, then keep it.

Same story on HP-UX and AIX. I think we have to throw -Wredundant-decls 
out. C allows multiple declarations if they're identical, so I don't see 
the point of having this warning switched on.


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/