This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add warning for boolean ?: value
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Andi Kleen <ak at muc dot de>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Mar 2002 18:10:29 +0000 (GMT)
- Subject: Re: Add warning for boolean ?: value
On Fri, 29 Mar 2002, Andi Kleen wrote:
> No I haven't done such analysis. If it should be a problem for people
> they will hopefully complain and I promise to submit another patch to
> move it into -Wall.
Analysis justifying warnings is to be encouraged. It's often done to
support optimisations (whether by saying how many times they trigger
during bootstrap, or the more detailed analysis used e.g. to tune the
branch prediction heuristics). Recent discussions on the gcc list suggest
a lot of dislike for mandatory warnings in general and so they need
especially good justification.
> > Obviously, testcases would be needed for this warning, and the
>
> Testcases for warnings? Is there any precendence for that in the existing
> test suite? After all it doesn't hurt much if it should ever break.
Testcases for all new warnings are required. See:
http://gcc.gnu.org/contribute.html
http://gcc.gnu.org/codingconventions.html
The testsuite is not any longer only a regression testsuite.
--
Joseph S. Myers
jsm28@cam.ac.uk