* 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
+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
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;
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;
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
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);
end if;
when N_Reference =>
- return N = Prefix (P);
+ return N = Prefix (P);
when N_Explicit_Dereference =>
return False;
-- 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
-- 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
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);
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);
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