Interestingly other compilers on other platforms accept a function as a controlling expression in an if statement without complaint. That expression should have scalar type, i.e. either arithmetic or pointer. This test program demonstrates Sun catching the error.