Possible Duplicate:
Is short-circuiting boolean operators mandated in C/C++? And evaluation order?
While researching an iOS issue, I found the following answer: How to tell if UIViewController's view is visible
The specifics of the answer are not important, but what IS important is that it basically says that if you have an conditional statement that looks like the following...
if(X && Y)
{
//do stuff here
}
If X is false, Y will never be evaluated. Is this true? Can it be certain that the compiler will not optimize it to be if(Y && X)
?