I recently stumbled across the following behaviour of gcc 3.2.2 writing a c program:
In an if statement I forgot the braces of a function and wrote:
if
if (myFunc) is equivalent to if (&myFunc), so you're testing the address of a function, which of course will always be non-zero, i.e. true.
if (myFunc)
if (&myFunc)
With gcc 4.2.1 and -Wall I get the following warning:
-Wall
myfunc.c:11: warning: the address of ‘myFunc’ will always evaluate as ‘true’