This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]