[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: -Wredundant-decls

From: Branko Čibej <brane_at_xbc.nu>
Date: 2000-12-20 20:38:23 CET

Greg Hudson wrote:

>> 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)
>
>
> It would be interesting to make a feature test with an interface
> something like like:
>
> AC_CHECK_WARNINGS(-Wredundant-decls -Wall,stdio.h sys/types.h
> X11/Xlib.h)
>
> which would try each of the listed warning flags against all the
> listed header files and spit out the warning flags which don't trip up
> on headers. (You'd also filter out the warning flags which don't work
> with your chosen compiler.) But that's probably well beyond the
> amount of effort we want to put into the problem.

This is an interesting idea. The problem I see here is that there may be
a different combination of headers on each platform. For instance, HP-UX
10.20 warns about "getopt" if you include both <stdio.h> and <stdlib.h>,
and "errno" is declared in both <errno.h> and <sys/errno.h>.

-- 
Brane �ibej
    home:   <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane_at_acm.org>            http://www.acm.org/
Received on Sat Oct 21 14:36:17 2006

This is an archived mail posted to the Subversion Dev mailing list.