]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Avoid repeated range checks when negating a rational number
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 27 Feb 2025 10:44:54 +0000 (11:44 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 6 Jun 2025 08:37:16 +0000 (10:37 +0200)
commit73763e312fb3fc483ab0d159d35998b5d927a333
tree8d941244324a4114edd5881e0cb01ed343128cf6
parent782d1cec98f0116797aecc80325f5c351c707d97
ada: Avoid repeated range checks when negating a rational number

Use local constant to avoid repeated range checks (at least in the debug
builds), but also to make the code easier to read and consistent in style
with similar routines in the same package.

gcc/ada/ChangeLog:

* urealp.adb (UR_Negate): Capture array element in a local constant.
gcc/ada/urealp.adb