Re:In C++, is empty() faster than comparing the size with zero?
by bregma on Thursday October 28, 2021 @04:01PM
(#29031097)
> Saying 'this is what I will do when an int can't hold the assigned value' is defining the behavior, ergo it is no longer undefined!
Defining the behaviour of a particular compiler under specific circumstances does not equate to defining the behaviour of the C language.
Vendors are allowed to do anything they want when code containing undefined behaviour is submitted to their compiler
Yes, and his compiler is saying that it will trap these events. Are you suggesting that the compiler will secretly ignore this setting and then go on to do all kinds of insane things?