This function can invoke undefined behavior:<p><pre><code>    int f(int x) { return x + 1; }
</code></pre>
So can this one:<p><pre><code>    int get(struct Something *s) { return s-&gt;field; }
</code></pre>
Figuring out when undefined behavior needs a warning and when it&#x27;s unnecessary because it&#x27;s known by the programmer to be impossible is a Hard Problem. Especially since the compiler has no idea whether the programmer wrote f() knowing that they&#x27;ll never pass in INT_MAX, or whether the programmer actually does expect to pass in INT_MAX and expects to receive INT_MIN as the result.