Re:C and C++ Prioritize Performance over Correctness
by kragen on Friday August 18, 2023 @03:55PM
(#37181226)
i see, thanks
maybe we should develop a nonmalicious compiler
Re:C and C++ Prioritize Performance over Correctness
by gavinhoward on Friday August 18, 2023 @09:41PM
(#37184593)
I have routines that take the unsigned values and interpret them as signed, two's-complement values.
So you would write this:
That `y_ssize_lt()` function computes whether `val` is less than `temp1` as though they were signed, two's-complement integers. But because they are actually unsigned, the compiler cannot be malicious and delete that code.