aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/ada/ChangeLog24
-rw-r--r--gcc/ada/fmap.adb7
-rw-r--r--gcc/ada/prj-nmsc.adb9
-rw-r--r--gcc/ada/sem_ch12.adb1
-rw-r--r--gcc/ada/sem_ch5.adb3
-rw-r--r--gcc/ada/sem_util.adb2
-rw-r--r--gcc/ada/sinfo.ads26
-rw-r--r--gcc/ada/sinput-p.adb14
8 files changed, 64 insertions, 22 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 748e0c7..7ce1648 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,27 @@
+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)
+
2009-04-16 Ed Falis <falis@adacore.com>
* s-vxwext-kernel.adb: (ERROR): deleted unused constant
diff --git a/gcc/ada/fmap.adb b/gcc/ada/fmap.adb
index 6770ee9..0d5061d 100644
--- a/gcc/ada/fmap.adb
+++ b/gcc/ada/fmap.adb
@@ -321,9 +321,10 @@ package body Fmap is
if (Last < First + 2) or else (SP (Last - 1) /= '%')
or else (SP (Last) /= 's' and then SP (Last) /= 'b')
then
- Write_Str ("warning: mapping file """);
- Write_Str (File_Name);
- Write_Line (""" is incorrectly formatted");
+ Write_Line
+ ("warning: mapping file """ & File_Name &
+ """ is incorrectly formatted");
+ Write_Line ("Line = """ & SP (First .. Last) & '"');
Empty_Tables;
return;
end if;
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index e2d3b01..1612510 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -8827,8 +8827,13 @@ package body Prj.Nmsc is
if Result = null then
return "";
else
- Canonical_Case_File_Name (Result.all);
- return Result.all;
+ declare
+ R : String := Result.all;
+ begin
+ Free (Result);
+ Canonical_Case_File_Name (R);
+ return R;
+ end;
end if;
end Path_Name_Of;
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 6f08287..f0212e0 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -6173,7 +6173,6 @@ package body Sem_Ch12 is
begin
E1 := First_Entity (P);
-
while Present (E1) and then E1 /= Instance loop
if Ekind (E1) = E_Package
and then Nkind (Parent (E1)) = N_Package_Renaming_Declaration
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index dab9871..5cf092c 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -2032,7 +2032,8 @@ package body Sem_Ch5 is
End_Scope;
Kill_Current_Values;
- -- No point in checking for warnings in code we generated
+ -- Check for infinite loop. We skip this check for generated code, since
+ -- it justs waste time and makes debugging the routine called harder.
if Comes_From_Source (N) then
Check_Infinite_Loop_Warning (N);
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 9642ea7..d036c85 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7242,7 +7242,7 @@ package body Sem_Util is
end if;
when N_Reference =>
- return N = Prefix (P);
+ return N = Prefix (P);
when N_Explicit_Dereference =>
return False;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index ffb44d11a4..5a20bc7 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -621,10 +621,15 @@ package Sinfo is
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy backwards, i.e.
- -- starting at the highest addressed element. Note that if neither of the
- -- flags Forwards_OK or Backwards_OK is set, it means that the front end
- -- could not determine that either direction is definitely safe, and a
- -- runtime check may be required if the backend cannot figure it out.
+ -- starting at the highest addressed element. This is the case if either
+ -- the operands do not overlap, or they may overlap, but if they do,
+ -- then the left operand is at a higher address than the right operand.
+ --
+ -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
+ -- means that the front end could not determine that either direction is
+ -- definitely safe, and a runtime check may be required if the backend
+ -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
+ -- set, it means that the front end can assure no overlap of operands.
-- Body_To_Inline (Node3-Sem)
-- present in subprogram declarations. Denotes analyzed but unexpanded
@@ -1023,10 +1028,15 @@ package Sinfo is
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy forwards, i.e.
- -- starting at the lowest addressed element. Note that if neither of the
- -- flags Forwards_OK or Backwards_OK is set, it means that the front end
- -- could not determine that either direction is definitely safe, and a
- -- runtime check is required.
+ -- starting at the lowest addressed element. This is the case if either
+ -- the operands do not overlap, or they may overlap, but if they do,
+ -- then the left operand is at a lower address than the right operand.
+ --
+ -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
+ -- means that the front end could not determine that either direction is
+ -- definitely safe, and a runtime check may be required if the backend
+ -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
+ -- set, it means that the front end can assure no overlap of operands.
-- From_At_End (Flag4-Sem)
-- This flag is set on an N_Raise_Statement node if it corresponds to
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