&gt; You want the compiler to error out until you tell it whether or not you want a check. Or rather, whether you want checked-division semantics—which will be free on some architectures and costly on others—or unchecked-division semantics [...]<p>I think I disagree. I don&#x27;t want that to be a feature of the compiler, but of the language, in which case there is no way to &quot;error out&quot;. That is to say: there should be operators for one kind of semantics and operators for another kind (it&#x27;s a bad idea to overload the same operator on the same operands with different semantics). And if the language doesn&#x27;t have that feature, the compiler shouldn&#x27;t error out--unless it can prove that your code will unavoidably run into undefined behaviour, in which case, simply not producing a binary at all is perfectly within the range of acceptable results, and probably a good idea.<p>&gt; [...] you then have to code for both the case where your function can now trap&#x2F;throw an exception, and the case where control continues through your function using the invalid calculated intermediate as input for further operations. You&#x27;ve probably coded to handle one or the other—but it&#x27;s very unlikely you&#x27;ve coded to handle both. And why would you want to have to?<p>If you think in terms of handling the results of undefined behavior, you are kindof doing it backwards. The language specifies certain preconditions that you have to meet in order for some operation to be defined. It&#x27;s your job as a programmer to make sure that those preconditions are met, in which case it doesn&#x27;t matter what some compiler does when they are not met.<p>&gt; The compiler should ensure that your code has the semantics you want everywhere—whether those be &quot;always do X&quot; or &quot;do whatever the target arch&#x27;s closest approximation to X is.&quot;<p>Well, yes and no. Giving you the same semantics certainly is a good idea, where possible. But to &quot;do whatever the target arch&#x27;s closest approximation to X is.&quot; is a useless idea, as you can not write any reliable code on that basis. A language always has to specify certain properties that an operation needs to have, and every compiler needs to choose an implementation that fulfill those requirements, not just some vague &quot;as close as possible&quot;--that way, if you write code that only relies on those guaranteed properties, it will compile and run correctly on all targets. The question is only how many details are guaranteed properties and which parts are up to the implementation, aka &quot;undefined behaviour&quot;, aka &quot;stuff you must not rely on in your code&quot;. It&#x27;s kindof impossible to really guarantee &quot;the same semantics&quot;--however, there are some guarantees that would be useful for a lot of code and that C, unfortunately, does not provide.<p>&gt; What we call &quot;undefined behavior&quot; in C is actually implemented by C compilers as a very specific set of assumptions about what semantics developers prefer—and those assumptions may or may not be right for most code, but they can&#x27;t be right for 100% of code.<p>That&#x27;s actually not true. What we call &quot;undefined behavior&quot; in C is actually implemented by C compilers as &quot;it doesn&#x27;t matter what happens in this case&quot;. Sometimes, compiler writers will actually define some of the things that are undefined behavior in the standard, but more often than not, the compiler doesn&#x27;t actually contain any explicit definition for what is supposed to happen in those cases. The compiler only worries about transforming your source code into machine code that does what the standard specifies where the standard does specify what is supposed to happen--where the standard doesn&#x27;t specify anything, any resulting behavior is just a coincident byproduct of how the compiler works, which can change with any new release, and even depending on optimization options.<p>&gt; So why should compilers allow programmers to leave their desired semantics implicit?<p>They actually don&#x27;t. If the programmer wants to express &quot;add x to y (two signed integers) with wrap around&quot; and writes in a C program &quot;x+y&quot;, the programmer has simply made a mistake. It may be that in some cases, if you write &quot;x+y&quot;, your compiler will behave with those intended semantics. But that is a coincidence. There is nothing implicit there, &quot;x+y&quot; in C simply means something different than the programmer intended, and just by coincidence sometimes produces the desired result. It&#x27;s not any more correct than writing &quot;exit(0);&quot; when you want to print &quot;hello world&quot;--the only difference is that the compiler is free to produce the intended result even though it&#x27;s not required to, which confuses many people. But just because the compiler sometimes produces the intended result does not mean that what you wrote actually means what you intended.