This is the mail archive of the gcc@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: 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


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