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 15:39:51 +0000 (GMT)
- Subject: Re: Add warning for boolean ?: value
On Fri, 29 Mar 2002, Andi Kleen wrote:
> It happened twice to me recently, so I added this warning to gcc. IMHO it is
> near always a mistake so I made the warning unconditional.
Have you any analysis showing that it is nearly always an error when other
people use this extension? For example, a large body of code using this
extension, by multiple authors, analysed by how many uses of this
extension do / do not use a boolean, and, of those using a boolean, how
many are errors?
Obviously, testcases would be needed for this warning, and the
documentation for the extension in extend.texi would need to explain that
GCC considers this usage a mistake and warns for it.
--
Joseph S. Myers
jsm28@cam.ac.uk