From c6d8c2033ce0d67bc00ea7bec1f510836fcb40bb Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Thu, 3 Apr 2025 14:22:24 +0200 Subject: [PATCH] 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. --- 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 93e292cc34f..4b444c2f8a7 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; -- 2.47.2