X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fada%2Fa-stwima.adb;h=aeefb7c3e6d736e1da7c9a18e5609661cca4f69f;hb=0c1fe26b5f780a30fd26e3e3075764f99322dbbf;hp=d56fb11ca8ba6f213d56117066b94246e239c7dd;hpb=3817baeb247b3239c00beb407e03e32cb06900c2;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/ada/a-stwima.adb b/gcc/ada/a-stwima.adb index d56fb11ca8b..aeefb7c3e6d 100644 --- a/gcc/ada/a-stwima.adb +++ b/gcc/ada/a-stwima.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,7 +31,7 @@ -- -- ------------------------------------------------------------------------------ -with Unchecked_Deallocation; +with Ada.Unchecked_Deallocation; package body Ada.Strings.Wide_Maps is @@ -148,7 +148,7 @@ package body Ada.Strings.Wide_Maps is -- The sorted, discontiguous form is canonical, so equality can be used - function "=" (Left, Right : in Wide_Character_Set) return Boolean is + function "=" (Left, Right : Wide_Character_Set) return Boolean is begin return Left.Set.all = Right.Set.all; end "="; @@ -363,7 +363,7 @@ package body Ada.Strings.Wide_Maps is procedure Finalize (Object : in out Wide_Character_Mapping) is - procedure Free is new Unchecked_Deallocation + procedure Free is new Ada.Unchecked_Deallocation (Wide_Character_Mapping_Values, Wide_Character_Mapping_Values_Access); @@ -375,7 +375,7 @@ package body Ada.Strings.Wide_Maps is procedure Finalize (Object : in out Wide_Character_Set) is - procedure Free is new Unchecked_Deallocation + procedure Free is new Ada.Unchecked_Deallocation (Wide_Character_Ranges, Wide_Character_Ranges_Access); @@ -556,7 +556,7 @@ package body Ada.Strings.Wide_Maps is --------------- function To_Ranges - (Set : in Wide_Character_Set) return Wide_Character_Ranges + (Set : Wide_Character_Set) return Wide_Character_Ranges is begin return Set.Set.all; @@ -643,7 +643,7 @@ package body Ada.Strings.Wide_Maps is end if; end loop; - if Result (N).High < Result (N).Low then + if N > 0 and then Result (N).High < Result (N).Low then N := N - 1; end if;