This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning when a function's address is tested?
Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
> Something like the attached patch should work, I'll propose it on
> gcc-patches after I've tested it.
Informally speaking, the patch looks good - just a couple of notes:
1) there's now code in the C front end that handles a bare
FUNCTION_DECL - it should be found and removed.
2) this sentence
> ! warning ("the address of `%D', will always be `true'",
> ! TREE_OPERAND (expr, 0));
is awkward English - suggest removing the comma and the quotes around 'true'.
zw