The last statement executed is return if 0;. The return may not have been executed, but the statement did. An if statement whose condition evaluates to something false, evaluates to that something.
(I believe the last sentence is undocumented behaviour.)