Rename -Wall to Wsparse-all, so it doesn't get turned on unintentionally
commitc0d5c5dcb0c673afeeafadab6bf5fdef8f904ce3
authorJosh Triplett <josh@joshtriplett.org>
Sun, 11 Oct 2009 22:47:03 +0000 (11 22:47 +0000)
committerChristopher <sparse@chrisli.org>
Mon, 29 Mar 2010 00:51:36 +0000 (28 17:51 -0700)
treeee2241a231edc0e6284675169bf7b3c1263a522c
parent008e1c61f41127d05316a85449571721c1ec0411
Rename -Wall to Wsparse-all, so it doesn't get turned on unintentionally

sparse's -Wall option turns on all sparse warnings, including those that
many projects will not want; for instance, warnings that enforce
particular stylistic choices, or behavior allowed by a standard but
considered questionable or error-prone.  Furthermore, using -Wall means
accepting all future warnings sparse may start issuing, not just those
intentionally turned on by default.

Other compilers like GCC also use -Wall, and interpret it to mean "turn
on a sensible set of warnings".  Since sparse exists to emit warnings,
it already defaults to emitting a sensible set of warnings.  Many
projects pass the same options to both sparse and the C compiler,
including warning options like -Wall; this results in turning on
excessive amounts of sparse warnings.

cgcc already filtered out -Wall, but many projects invoke sparse
directly rather than using cgcc.  Remove that filter, now that -Wall
does not change sparse's behavior.

Projects almost certainly don't want to use the new -Wsparse-all option;
they should choose the specific set of warnings they want, or just go
with sparse's defaults.

Also update cgcc to know about Wsparse-all and not pass it to GCC, and
update a test case that unnecessarily used -Wall.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
cgcc
lib.c
sparse.1
validation/specifiers1.c