Just noticed that -Wcast-align also needs to be on the reject list as
cbdata and some other constructs requires this (safely). Did not notice
this as x86 does not have any alignment requirements..
Regards
Henrik
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..
>
> Regards
> Henrik
Received on Wed Oct 17 2001 - 15:42:44 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:33 MST