This is a C-feature (and since C is a subset set of C++, it will be the same way in C++), C uses lazy evaluation on the operators || and &&, to allow just these things:
if(true || b()) // b() will never be called
if(false && b()) // poor b() won''t be called now either
So it''s not a compiler bug, it''s a feature
![](smile.gif)
.