diff options
author | Robert Dewar <dewar@adacore.com> | 2010-10-08 12:30:30 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-08 14:30:30 +0200 |
commit | 394860586c4ea568a64497652df7dc318a0d734d (patch) | |
tree | bfef21a7dc1cd2c351f3169e1511b5422373c9a8 /gcc/ada/sem_attr.adb | |
parent | fe2eee8e2118c72fcafc1cd1d9efedb228fd4ca2 (diff) | |
download | gcc-394860586c4ea568a64497652df7dc318a0d734d.zip gcc-394860586c4ea568a64497652df7dc318a0d734d.tar.gz gcc-394860586c4ea568a64497652df7dc318a0d734d.tar.bz2 |
sem_attr.adb (Eval_Attribute, case Width): Avoid ludicrous long loop for case of Wide_[Wide_]Character.
2010-10-08 Robert Dewar <dewar@adacore.com>
* sem_attr.adb (Eval_Attribute, case Width): Avoid ludicrous long loop
for case of Wide_[Wide_]Character.
2010-10-08 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb: Minor reformating
Minor code reorganization.
From-SVN: r165166
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 6 |
1 files changed, 5 insertions, 1 deletions
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); |