+2016-05-02 Arnaud Charlet <charlet@adacore.com>
+
+ * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
+ they are declared; refine type of a counter from Integer to Natural.
+ * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
+ prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
+ exp_ch3.adb: Minor editing.
+
2016-05-02 Yannick Moy <moy@adacore.com>
* a-tigeli.adb (Get_Line): Always set Last prior to returning.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Result := Truncation (RT, abs X);
Tail := abs X - Result;
- if Tail >= Ureal_Half then
+ if Tail >= Ureal_Half then
Result := Result + Ureal_1;
end if;
Result := Truncation (RT, Abs_X);
Tail := Abs_X - Result;
- if Tail > Ureal_Half then
+ if Tail > Ureal_Half then
Result := Result + Ureal_1;
elsif Tail = Ureal_Half then
-- return;
-- end if;
- -- if Rev then
+ -- if Rev then
-- Li1 := Left_Hi;
-- Ri1 := Right_Hi;
-- else
-- --
-- B o d y --
-- --
--- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-------------
function Get_Nat return Nat is
- Val : Nat;
- C : Character;
+ Val : Nat := 0;
+ C : Character := Nextc;
begin
- C := Nextc;
- Val := 0;
-
if C not in '0' .. '9' then
raise Data_Error;
end if;
--------------
procedure Get_Name is
- N : Integer;
+ N : Natural := 0;
begin
- N := 0;
while Nextc > ' ' loop
N := N + 1;
Name_Str (N) := Getc;
if Call_GPR_Tool then
case The_Command is
when Make | Compile | Bind | Link =>
- if Locate_Exec_On_Path (Gprbuild) /= null then
+ if Locate_Exec_On_Path (Gprbuild) /= null then
Program := new String'(Gprbuild);
Get_Target := True;
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- An extending project inherits its parent projects' languages
-- so if needed we should create entries for those languages
- if Lang = null then
+ if Lang = null then
Extended := Project.Extends;
while Extended /= null loop
Lang := Get_Language_From_Name
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
pragma Warnings (Off, Dont_Care);
begin
- if not Opt.Keep_Temporary_Files then
+ if not Opt.Keep_Temporary_Files then
if Current_Verbosity = High then
Write_Line ("Removing temp file: " & Get_Name_String (Path));
end if;
-- --
-- B o d y --
-- --
--- Copyright (C) 2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2014-2016, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Add signals that map to Ada exceptions to the mask
for J in Exception_Interrupts'Range loop
- if State (Exception_Interrupts (J)) /= Default then
+ if State (Exception_Interrupts (J)) /= Default then
Result :=
sigaddset
(Signal_Mask'Access, Signal (Exception_Interrupts (J)));
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Add signals that map to Ada exceptions to the mask
for J in Exception_Interrupts'Range loop
- if State (Exception_Interrupts (J)) /= Default then
+ if State (Exception_Interrupts (J)) /= Default then
Result :=
sigaddset (Signal_Mask'Access, Signal (Exception_Interrupts (J)));
pragma Assert (Result = 0);
-- Verify that the loop name is hot hidden by an unrelated
-- declaration in an inner scope.
- elsif Ekind (Ent) /= E_Label and then Ekind (Ent) /= E_Loop then
+ elsif Ekind (Ent) /= E_Label and then Ekind (Ent) /= E_Loop then
Error_Msg_Sloc := Sloc (Ent);
Error_Msg_N ("implicit label declaration for & is hidden#", Id);
-- Issue error message, but avoid this if error issued already.
-- Use identifier of prefix if one is available.
- if P_Name = Any_Id then
+ if P_Name = Any_Id then
null;
-- It is not an error if the prefix is the current instance of
Next (Pack_Name);
end loop;
- elsif Nkind (Decl) = N_Use_Type_Clause then
+ elsif Nkind (Decl) = N_Use_Type_Clause then
Chain_Use_Clause (Decl);
Id := First (Subtype_Marks (Decl));
Ent1 := Entity_Of_Unit (Unit1);
Ent2 := Entity_Of_Unit (Unit2);
- if Scope (Ent2) = Standard_Standard then
+ if Scope (Ent2) = Standard_Standard then
Error_Msg_Sloc := Sloc (Current_Use_Clause (T));
Err_No := Clause1;
end if;
while Present (Old_Disc) and then Present (New_Disc) loop
- if Old_Disc = Par_Disc then
+ if Old_Disc = Par_Disc then
return New_Disc;
end if;