aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput-p.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-16 11:03:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-16 11:03:56 +0200
commitb4763f5c4a9d2bde0963bbb9422aa3480c5e81da (patch)
tree1988421b1a76b066acdb0b87a9eb5302ceb428bf /gcc/ada/sinput-p.adb
parent0c72247e06e7cebbe398cb3c3948e77d8939f5ce (diff)
downloadgcc-b4763f5c4a9d2bde0963bbb9422aa3480c5e81da.zip
gcc-b4763f5c4a9d2bde0963bbb9422aa3480c5e81da.tar.gz
gcc-b4763f5c4a9d2bde0963bbb9422aa3480c5e81da.tar.bz2
[multiple changes]
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) From-SVN: r146152
Diffstat (limited to 'gcc/ada/sinput-p.adb')
-rw-r--r--gcc/ada/sinput-p.adb14
1 files changed, 8 insertions, 6 deletions
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