This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/10170] No warning for "if(foo)" instead of "if(foo())"
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2003 15:24:47 -0000
- Subject: [Bug c/10170] No warning for "if(foo)" instead of "if(foo())"
- References: <20030320182600.10170.xkinh@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10170
------- Additional Comments From gdr at integrable-solutions dot net 2003-07-19 15:24 -------
Subject: Re: No warning for "if(foo)" instead of "if(foo())"
"xkinh at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| There is no question about right or wrong or how to do
I'm not interpreting your request as "right" or "wrong".
I don't think anyone is talking about "right" or "wrong".
| it. I just hope the GCC compiler, if it's possible,
| will give a warning message as other compilers do, so
| users could see their mistakes. This warning is the
| same warning of :
| if ( a_number = another_number)
I don't think so.
And for that warning, we got existing practice. For
if(foo)
we've already got existing pratice the other way around.
| The more user friendly a compiler provides, the more
| users love and use it.
Sure, that is why the compiler better not emit more noise than
necessary :-)
-- Gaby