If I were to create a function
bool foo(bool a, bool b) { return a && b; }
And use it...
foo(false, function_with_side_effects());
Would the compiler be allowed to inline it such that the function with side effects isn't called? In other words, could it inline it to this:
false && function_with_side_effects();
Again, this isn't causing me any problems; it's just a curiosity that recently crossed my mind.












