On Friday, 17 October 2014 at 13:44:24 UTC, ketmar via Digitalmars-d wrote:
On Fri, 17 Oct 2014 09:46:48 +0000
via Digitalmars-d <[email protected]> wrote:
In D (and C++) you would get:

if (x < ((x+1)&0xffffffff)){…}
perfect. nice and straightforward way to do overflow checks.

Besides, the code uses x + 1, so the code is already in undefined state. It's just as wrong as the "horrible code with UB" we wère trying to avoid in the first place.

So much for convincing me that it's a good idea...

Reply via email to