Commit 8f2eeab7 by Pascal Obry Committed by Arnaud Charlet

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
parent bea993f9
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> 2009-06-25 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case 'Access and * exp_attr.adb (Expand_N_Attribute_Reference, case 'Access and
......
...@@ -94,8 +94,7 @@ package body Ada.Strings.Search is ...@@ -94,8 +94,7 @@ package body Ada.Strings.Search is
-- Unmapped case -- Unmapped case
if Mapping'Address = Maps.Identity'Address then if Mapping'Address = Maps.Identity'Address then
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
if Pattern = Source (Ind .. Ind + PL1) then if Pattern = Source (Ind .. Ind + PL1) then
Num := Num + 1; Num := Num + 1;
Ind := Ind + Pattern'Length; Ind := Ind + Pattern'Length;
...@@ -107,8 +106,7 @@ package body Ada.Strings.Search is ...@@ -107,8 +106,7 @@ package body Ada.Strings.Search is
-- Mapped case -- Mapped case
else else
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
Cur := Ind; Cur := Ind;
for K in Pattern'Range loop for K in Pattern'Range loop
if Pattern (K) /= Value (Mapping, Source (Cur)) then if Pattern (K) /= Value (Mapping, Source (Cur)) then
......
...@@ -2262,7 +2262,7 @@ package body Sem_Ch4 is ...@@ -2262,7 +2262,7 @@ package body Sem_Ch4 is
return; return;
end if; end if;
-- An indexing requires at least one actual. -- An indexing requires at least one actual
if not Is_Empty_List (Actuals) if not Is_Empty_List (Actuals)
and then and then
...@@ -2447,7 +2447,7 @@ package body Sem_Ch4 is ...@@ -2447,7 +2447,7 @@ package body Sem_Ch4 is
if Report and not Is_Indexed and not Is_Indirect then if Report and not Is_Indexed and not Is_Indirect then
-- Ada 2005 (AI-251): Complete the error notification -- 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)) if Is_Class_Wide_Type (Etype (Formal))
and then Is_Interface (Etype (Etype (Formal))) and then Is_Interface (Etype (Etype (Formal)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment