News for hackers. Stuff that matters.
Re:ISO C became unusable for operating systems development by bluecalm on Saturday January 22, 2022 @01:57AM (#30034379)
What if you write code that doesn't wrap but you don't want the exception or any kind of check either?

That's the whole point of UB. Let the compiler optimize by assuming your integers are in range. I get that it doesn't matter in a language like C#/Java (they are so slow additional checks don't register) but in C throwing has costs and code that wraps would require additional logic on some platforms.

One way or another if you want C to "throw" (trap) you can get that by using compiler flags.

There are no comments on this comment yet.