Daniel Shahaf wrote:
> Julian Foad wrote on Wed, Dec 22, 2010 at 16:43:16 +0000:
> > GCC.
> >
> > From the output of "make":
> >
> > [...]/libtool --tag=CC --silent --mode=link gcc -Wno-system-headers
> > -Wold-style-definition -Wdeclaration-after-statement -Wpointer-arith
> > -Wwrite-strings -Wshadow -ansi -Wall -Wformat=2 -Wunused
> > -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
> > -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs
> > -Wunreachable-code -Winline -Wno-long-long -g -DAPR_POOL_DEBUG -Wundef
> > -Wendif-labels -Wcast-qual -Wno-deprecated-declarations
> > -Wno-unreachable-code -Wno-format-nonliteral -pthread
> > -D_LARGEFILE64_SOURCE -DNE_LFS -Werror=implicit-function-declaration
> > -DSVN_DEBUG -DAP_DEBUG [...]
> >
> > (The first group of options are inserted by Subversion's configury, and
> > my config/build/test script sets CFLAGS to "-g -O -DAPR_POOL_DEBUG
> > -Wundef -Wendif-labels
>
> > -Wcast-qual
>
> This one generates a couple dozen warnings for me....
Yup, me too. We have eliminated many of these (mainly "casting away
'const'") warnings over the years. The ones that are still present are
nigh on impossible to avoid; most of them are instances of correct code
that just can't be expressed cleanly within the rules of C "const"
syntax.
Personally, I prefer to enable this warning, because if I notice any new
instance of it appearing (and often I *do* notice, despite the noise
level), usually it is a useful indication that something is wrong.
But a warning-free build is also very useful, so not enabling it is also
a good choice.
- Julian
> > -Wno-deprecated-declarations -Wno-unreachable-code -Wno-format-nonliteral".)
>
> With these three, I now have a warning-free build --- thanks!
>
> (after r1052225, and modulo the svn-populate-node-origin issue from
> yesterday)
Received on 2010-12-23 12:45:46 CET