[gcc r16-1451] ada: Remove subexpression that's always False
Marc Poulhies
dkm@gcc.gnu.org
Thu Jun 12 08:40:06 GMT 2025
https://gcc.gnu.org/g:c6d8c2033ce0d67bc00ea7bec1f510836fcb40bb
commit r16-1451-gc6d8c2033ce0d67bc00ea7bec1f510836fcb40bb
Author: Ronan Desplanques <desplanques@adacore.com>
Date: Thu Apr 3 14:22:24 2025 +0200
ada: Remove subexpression that's always False
Also improve a few comments in the enclosing subprogram body.
gcc/ada/ChangeLog:
* libgnat/s-valuer.adb (Scan_Raw_Real): Remove subexpression. Improve
surrounding comments.
Diff:
---
gcc/ada/libgnat/s-valuer.adb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/libgnat/s-valuer.adb
index 93e292cc34f4..4b444c2f8a77 100644
--- a/gcc/ada/libgnat/s-valuer.adb
+++ b/gcc/ada/libgnat/s-valuer.adb
@@ -580,8 +580,8 @@ package body System.Value_R is
if Str (Index) in '0' .. '9' then
After_Point := False;
- -- If this is a digit it can indicates either the float decimal
- -- part or the base to use.
+ -- If this is a digit it can indicate either the integral part or the
+ -- base to use.
Scan_Integral_Digits
(Str, Index, Max, Base, False, Value, Scale, N,
@@ -632,10 +632,10 @@ package body System.Value_R is
end if;
end if;
- -- Scan the integral part if still necessary
+ -- Scan the integral part if there was a base and no point right after
if Base_Char /= ASCII.NUL and then not After_Point then
- if Index > Max or else As_Digit (Str (Index)) not in Valid_Digit then
+ if As_Digit (Str (Index)) not in Valid_Digit then
Bad_Value (Str);
end if;
More information about the Gcc-cvs
mailing list