Hacker News new | past | comments | ask | show | jobs | submit login

(first, I am not a D user but I really like what I have seen. I wish WG14 would take more inspiration from D than from C++)

C23 will require 2s-complement.

Signed overflow is still UB in C. I think this is a better choice than wrap around, because overflow is often a bug. With UB, you can use static analysis (to some degree) or run-time traps (if the compiler supports this) and then fix those bugs. If it were defined to wrap around, those bugs are much harder to find.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: