News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by beyondCritics on Thursday May 31, 2018 @01:10AM (#17194109)
Getting rid of this useless (crap #!§$§$§$) legacy stuff was overdue, so i am very happy to see it done. I personally think it is _the_ most important proposal for C++20, since it will remove a lot of pointless pressure from secure coding attempts and in turn make the world a little bit more secure.
Re:Signed Integers Are Two’s Complement by sanxiyn on Thursday May 31, 2018 @03:34AM (#17194622)
I don't see how. Integer overflows still can be security issues even if they wrap.
Re:Signed Integers Are Two’s Complement by johannes1234321 on Thursday May 31, 2018 @06:27AM (#17195272)
They can be security issues since the compiler is allowed to optimize stuff. The compiler can check, that some checks the user added "don't make sense" since those only would be hit if something undefined happens. An example is shown in https://www.tripwire.com/state-of-security/vulnerability-man... but there are many more.
Re:Signed Integers Are Two’s Complement by kazinator on Thursday May 31, 2018 @10:10AM (#17196418)
No, they can be security issues in that the program expected x + 1 to be a value bigger than x, but it is suddenly a big negative value.

The fact that this behavior is now blessed by ISO C makes no difference to it being wrong, and causing some security issue in the program.

Re:Signed Integers Are Two’s Complement by beyondCritics on Saturday June 02, 2018 @08:23AM (#17214245)
There will always be unavoidable issues, since C/C++ is a system language, designed to survive under tight performance pressure. The point here is, to remove pointless obstacles.
Re:Signed Integers Are Two’s Complement by loup-vaillant on Thursday May 31, 2018 @08:14AM (#17195707)
Alas, nope. Later revisions of this proposal still have undefined signed overflow. We still need -fwrap for the easy overflow checks.