diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 09:03:56 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 09:03:56 +0000 |
commit | 1f958cd0ef0ac24cb13ce0b01d4c92406c5f172d (patch) | |
tree | 1988421b1a76b066acdb0b87a9eb5302ceb428bf /gcc/ada/sinput-p.adb | |
parent | 74fb3c2733602bfc4bbf49c5abbad39dcc4b3622 (diff) | |
download | ppe42-gcc-1f958cd0ef0ac24cb13ce0b01d4c92406c5f172d.tar.gz ppe42-gcc-1f958cd0ef0ac24cb13ce0b01d4c92406c5f172d.zip |
2009-04-16 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Path_Name_Of): fix memory leak
2009-04-16 Robert Dewar <dewar@adacore.com>
* sinfo.ads (Backwards_OK, Forwards_OK): Clarify documentation
2009-04-16 Vincent Celier <celier@adacore.com>
* fmap.adb (Initialize): Show the current line when the mapping file
is detected as "incorrectly formatted".
2009-04-16 Robert Dewar <dewar@adacore.com>
* 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)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinput-p.adb')
-rw-r--r-- | gcc/ada/sinput-p.adb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb index 7bf1be29e7c..04a4eea8fb3 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 |