4 ms·
One of points of the article is that if you write a+b then compiler is free to assume that no overflow happens. If the compiler was sufficiently smart then if y
by IsTom 12y ago
One of points of the article is that if you write a+b then compiler is free to assume that no overflow happens. If the compiler was sufficiently smart then if you wrote
if(checked_addr(a,b,rp)) {
//something 1
} else {
//something 2
}
then compiler is free to assume no overflow happens and replace code with:
checked_add(a,b,rp);
//something 2