Re: GCC -W flags

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 17 Oct 2001 23:50:59 +0200

On all questions: no I have not.

Regarding profile optimizations: I do not foresee these giving any major
impact on Squid. The major bottlenecks is in design and cannot easily be
optimized away.

Regards
Henrik

Terence Kelly wrote:
>
> Just out of curiosity, do you ever run static verifiers
> on Squid source? Nowadays good vendor-supplied lints,
> third-party FlexeLint, and freeware LCLint are good at
> detecting very subtle flaws that no compiler can catch
> (because a lint can inspect the entire program whereas
> compilers see only one translation unit at a time).
>
> Also, I gather that recent versions of GCC support
> profile-driven optimization. Have you ever tried this?
> If so, what sort of improvement do you see?
>
> A few years ago the Sun compiler's profile feedback
> optimization gave me a 30% speedup on some CPU-intensive
> code.
>
> On Wed, 17 Oct 2001, Henrik Nordstrom wrote:
>
> > All Squid code is now tested and compiles cleanly with
> > the following combination of GCC -W flags
> >
> > -Werror
> > -Wall
> > -Wpointer-arith
> > -Wcast-align
> > -Wwrite-strings
> > -Wstrict-prototypes
> > -Wmissing-prototypes
> > -Wmissing-declarations
> > -Wcomments
> >
> > and all helpers is tested with at least
> >
> > -Werror
> > -Wall
> > -Wpointer-arith
> > -Wcast-align
> >
> > As a result, these options is now included each time I
> > build Squid, trapping any violations against these.
> >
> > The following GCC -W options have been rejected as these
> > warn on constructs which makes sense in Squid.
> >
> > -Wbad-function-cast (this warning is plain stupid)
> > -Wnested-externs (we have a couple of ugly hacks making good use of this)
> > -ansi (we need library extensions outside ANSI C)
> > -pedantic (glibc headers cannot surive this)
> > -Wconversion (we require prototypes, don't like overly typecasting)
> > -Wcast-qual (we sometimes need to be able to get rid of const)
> >
> > A reasonable long term goal is to also pass the
> > following options in order of preference:
> >
> > -Wshadow
> > -Wredundant-decls
> > -Wsign-compare
> > -W
> > -Wnested-externs (in a clean manner, not simply making them global)
> >
> > and maybe additional useful options I have forgotten os
> > supported by later GCC versions than mine..
Received on Wed Oct 17 2001 - 15:51:21 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:33 MST