|
From: Bart V. A. <bar...@gm...> - 2008-02-16 10:30:58
|
On Feb 15, 2008 11:58 PM, Julian Seward <js...@ac...> wrote: > > Does anybody have any experience with the desirability/usefulness > of -Wsign-compare? I have been using -Wsign-compare before in a large project. The warnings resulting from this option are usually easy to fix and the risk of such fixes to introduce new bugs is low. It becomes annoying however when -Wsign-compare prints warnings on constructs in header files. If I remember correctly, the STL header files are not sign-compare clean (which is not an issue for Valgrind). Some people (e.g. Linus Torvalds) object against -Wsign-compare for kernel code (see also http://lkml.org/lkml/2001/8/30/83). But if -Wsign-compare has helped you, I think we should enable it during compilation of Valgrind code. Bart. |