aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index a921909..96f216c 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -10906,9 +10906,10 @@ package body Sem_Attr is
-- that accommodates the Pos of the largest value, which
-- is the high bound of the range + one for the space.
- W := 1;
- T := Hi;
- while T /= 0 loop
+ W := 1; -- one character for the leading space
+ W := W + 1; -- one character for the 0 .. 9 digit
+ T := Hi; -- one character for every decimal digit
+ while T >= 10 loop
T := T / 10;
W := W + 1;
end loop;