This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC feature request: warn on "if (function_name)"
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Jamie Lokier <jamie at shareable dot org>
- Cc: gcc at gcc dot gnu dot org, Ross Dickson <ross at datscreative dot com dot au>, Andrew Pinski <pinskia at physics dot uc dot edu>, linux-kernel at vger dot kernel dot org
- Date: Fri, 13 Feb 2004 20:51:21 -0800
- Subject: Re: GCC feature request: warn on "if (function_name)"
- References: <200402120122.06362.ross@datscreative.com.au> <402CB24E.3070105@gmx.de> <200402140041.17584.ross@datscreative.com.au> <200402141124.50880.ross@datscreative.com.au> <20040214044656.GI31199@mail.shareable.org>
On Feb 13, 2004, at 20:46, Jamie Lokier wrote:
Perhaps a later GCC than 3.2.2 already has this test; if someone is
able to check, that would be nice.
Yes, 3.4.0 does have this check.
t.c:5: warning: the address of `i', will always evaluate as `true'
Thanks,
Andrew Pinski