From 25535d0efd18a9558fbde52ba88ce13525705472 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 25 Jun 2009 08:42:46 +0000 Subject: [PATCH] 2009-06-25 Pascal Obry * sem_ch4.adb: Minor reformatting. * a-strsea.adb: Fix confusion between 'Length and 'Last. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148933 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/a-strsea.adb | 6 ++---- gcc/ada/sem_ch4.adb | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f9f110b..ba22776 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2009-06-25 Pascal Obry + + * sem_ch4.adb: Minor reformatting. + + * a-strsea.adb: Fix confusion between 'Length and 'Last. + 2009-06-25 Ed Schonberg * exp_attr.adb (Expand_N_Attribute_Reference, case 'Access and diff --git a/gcc/ada/a-strsea.adb b/gcc/ada/a-strsea.adb index 1994745..a9093ed 100644 --- a/gcc/ada/a-strsea.adb +++ b/gcc/ada/a-strsea.adb @@ -94,8 +94,7 @@ package body Ada.Strings.Search is -- Unmapped case if Mapping'Address = Maps.Identity'Address then - Ind := Source'First; - while Ind <= Source'Length - PL1 loop + while Ind <= Source'Last - PL1 loop if Pattern = Source (Ind .. Ind + PL1) then Num := Num + 1; Ind := Ind + Pattern'Length; @@ -107,8 +106,7 @@ package body Ada.Strings.Search is -- Mapped case else - Ind := Source'First; - while Ind <= Source'Length - PL1 loop + while Ind <= Source'Last - PL1 loop Cur := Ind; for K in Pattern'Range loop if Pattern (K) /= Value (Mapping, Source (Cur)) then diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index c9585a08..e94a331 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -2262,7 +2262,7 @@ package body Sem_Ch4 is return; end if; - -- An indexing requires at least one actual. + -- An indexing requires at least one actual if not Is_Empty_List (Actuals) and then @@ -2447,7 +2447,7 @@ package body Sem_Ch4 is if Report and not Is_Indexed and not Is_Indirect then -- Ada 2005 (AI-251): Complete the error notification - -- to help new Ada 2005 users + -- to help new Ada 2005 users. if Is_Class_Wide_Type (Etype (Formal)) and then Is_Interface (Etype (Etype (Formal))) -- 2.7.4