Help stabilising mini-gmp

Marc Glisse marc.glisse at inria.fr
Sun Nov 20 17:50:21 UTC 2016


On Sun, 20 Nov 2016, Torbjörn Granlund wrote:

> Marc Glisse <marc.glisse at inria.fr> writes:
>
>  After inlining, there are subtractions. check_si is called at least
>  once with oi = si + c (c is ±1). gcc simplifies the test si > si - 1
>
> Inlining of check_si?

Of all the functions. (note that I am just speculating, but the warning 
does not surprise me)

> If the code becomes undefined by gcc's transformations, that it's a
> compiler bug.

That's not at all what I said, the code doesn't become undefined. If it 
was fine, it remains fine. If it was broken, the brokenness may become 
more obvious. Let me rephrase the warning:

"Reminder: computing INT_MIN-1 is forbidden. If you are not doing that, 
you can ignore this message. I am giving you this warning because you are 
computing X-1 and I decided to key the launch of nuclear missiles to the 
value X==INT_MIN. Have a safe day!"

(the computation of X-1 is in try_op_si, but the warning points at the 
location where the compiler inserts the trigger for the nuclear missiles)

-- 
Marc Glisse


More information about the gmp-devel mailing list