I think the compiler is less concerned with whether the statement has any effect and more with the fact that the following is just wrong:



if (loglevel != 0)
File file = new...