From 394860586c4ea568a64497652df7dc318a0d734d Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Fri, 8 Oct 2010 12:30:30 +0000 Subject: sem_attr.adb (Eval_Attribute, case Width): Avoid ludicrous long loop for case of Wide_[Wide_]Character. 2010-10-08 Robert Dewar * sem_attr.adb (Eval_Attribute, case Width): Avoid ludicrous long loop for case of Wide_[Wide_]Character. 2010-10-08 Robert Dewar * exp_ch3.adb: Minor reformating Minor code reorganization. From-SVN: r165166 --- gcc/ada/sem_attr.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_attr.adb') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index eae4df2..5302ebb 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -7410,7 +7410,11 @@ package body Sem_Attr is -- All wide characters look like Hex_hhhhhhhh if J > 255 then - W := 12; + + -- No need to compute this more than once! + + W := Int'Max (W, 12); + exit; else C := Character'Val (J); -- cgit v1.1