diff options
author | Pascal Obry <obry@adacore.com> | 2009-06-25 08:42:46 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-25 10:42:46 +0200 |
commit | 8f2eeab7a7bf4562ba1ed32e51c879c756fb3193 (patch) | |
tree | 934f87de4f148196a58fc456d95045d8fa35b2a5 | |
parent | bea993f903e27a266ee22fbc7dd627fd1cbe1e1d (diff) | |
download | gcc-8f2eeab7a7bf4562ba1ed32e51c879c756fb3193.zip gcc-8f2eeab7a7bf4562ba1ed32e51c879c756fb3193.tar.gz gcc-8f2eeab7a7bf4562ba1ed32e51c879c756fb3193.tar.bz2 |
sem_ch4.adb: Minor reformatting.
2009-06-25 Pascal Obry <obry@adacore.com>
* sem_ch4.adb: Minor reformatting.
* a-strsea.adb: Fix confusion between 'Length and 'Last.
From-SVN: r148933
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/a-strsea.adb | 6 | ||||
-rw-r--r-- | 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 <obry@adacore.com> + + * sem_ch4.adb: Minor reformatting. + + * a-strsea.adb: Fix confusion between 'Length and 'Last. + 2009-06-25 Ed Schonberg <schonberg@adacore.com> * 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))) |