News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by joosters on Thursday October 28, 2021 @02:35PM (#29029648)
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!

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?

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.

Re:In C++, is empty() faster than comparing the size with zero? by joosters on Thursday October 28, 2021 @05:00PM (#29031938)
You are reading words that nobody wrote. No-one claimed that they were redefining the ‘C spec’ by passing flags to their compiler - the standards board’s job is still safe!