3 ms·
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html http://blog.llvm.org/2011/05/what-every-c-programmer-should-... > Signed integer overflow
by hnfong 4y ago
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html http://blog.llvm.org/2011/05/what-every-c-programmer-should-...
> Signed integer overflow: If arithmetic on an 'int' type (for example) overflows, the result is undefined. One example is that "INT_MAX+1" is not guaranteed to be INT_MIN.
Probably not what the GP meant, but I think this qualifies as a "buggy language (spec)"
- still_grokking 4y agoI don't think defining something as undefined is buggy per se. That's not what I've meant. But defining some things in a contradicting manner would make up a buggy spec, I guess. Regarding the int example, funny enough I made a comment about that just before here: https://news.ycombinator.com/item?id=32457056 https://news.ycombinator.com/item?id=32457056