From b4763f5c4a9d2bde0963bbb9422aa3480c5e81da Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 16 Apr 2009 11:03:56 +0200 Subject: [multiple changes] 2009-04-16 Emmanuel Briot * prj-nmsc.adb (Path_Name_Of): fix memory leak 2009-04-16 Robert Dewar * sinfo.ads (Backwards_OK, Forwards_OK): Clarify documentation 2009-04-16 Vincent Celier * fmap.adb (Initialize): Show the current line when the mapping file is detected as "incorrectly formatted". 2009-04-16 Robert Dewar * sem_ch12.adb: Minor reformatting * sem_ch5.adb: Minor comment addition * sem_util.adb: Minor reformatting * sinput-p.adb: Minor reformatting Add missing pragma Warnings (On) From-SVN: r146152 --- gcc/ada/sinput-p.adb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc/ada/sinput-p.adb') diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb index 7bf1be2..04a4eea 100644 --- a/gcc/ada/sinput-p.adb +++ b/gcc/ada/sinput-p.adb @@ -51,10 +51,11 @@ package body Sinput.P is procedure Clear_Source_File_Table is use System; + begin for X in 1 .. Source_File.Last loop declare - S : Source_File_Record renames Source_File.Table (X); + S : Source_File_Record renames Source_File.Table (X); Lo : constant Source_Ptr := S.Source_First; Hi : constant Source_Ptr := S.Source_Last; subtype Actual_Source_Buffer is Source_Buffer (Lo .. Hi); @@ -75,6 +76,8 @@ package body Sinput.P is function To_Actual_Source_Ptr is new Ada.Unchecked_Conversion (Address, Actual_Source_Ptr); + pragma Warnings (On); + Actual_Ptr : Actual_Source_Ptr := To_Actual_Source_Ptr (S.Source_Text (Lo)'Address); @@ -155,11 +158,10 @@ package body Sinput.P is Prj.Err.Scanner.Set_Special_Character ('#'); Prj.Err.Scanner.Set_Special_Character ('$'); - -- We scan past junk to the first interesting compilation unit - -- token, to see if it is SEPARATE. We ignore WITH keywords during - -- this and also PRIVATE. The reason for ignoring PRIVATE is that - -- it handles some error situations, and also to handle PRIVATE WITH - -- in Ada 2005 mode. + -- We scan past junk to the first interesting compilation unit token, to + -- see if it is SEPARATE. We ignore WITH keywords during this and also + -- PRIVATE. The reason for ignoring PRIVATE is that it handles some + -- error situations, and also to handle PRIVATE WITH in Ada 2005 mode. while Token = Tok_With or else Token = Tok_Private -- cgit v1.1