Isn't that undefined behaviour anyway? And it doesn't matter how many flags are checked – they are all checked at the same time.