+2016-04-19 Arnaud Charlet <charlet@adacore.com>
+
+ * sem_res.adb (Within_Subprogram_Call): Detect
+ also nodes that appear in entry calls.
+ (Resolve_Actuals, Insert_Default): Propagate
+ dimension information if any, from default expression to the
+ copy that appears in the list of actuals.
+ * uintp.ads: minor whitespace fix in comment.
+ * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
+ Minor code cleanup.
+ * set_targ.adb (Set_Targ): convert directly from
+ Natural to Pos, without intermediate conversion to Int.
+
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_ch6.adb (Process_Formals): Mark suspicious reference to
Lab_Decl : Node_Id;
Lab_Id : Node_Id;
New_A : Node_Id;
- Num_Ret : Int := 0;
+ Num_Ret : Nat := 0;
Ret_Type : Entity_Id;
Targ : Node_Id;
Line := 0;
Col := 0;
else
- Line := Int (Get_Logical_Line_Number (Ref_Entry.Def));
- Col := Int (Get_Column_Number (Ref_Entry.Def));
+ Line := Nat (Get_Logical_Line_Number (Ref_Entry.Def));
+ Col := Nat (Get_Column_Number (Ref_Entry.Def));
end if;
-- References to constant objects without variable inputs (see
Entity_Col => Col,
File_Num => Dependency_Num (Ref.Lun),
Scope_Num => Get_Scope_Num (Ref.Ref_Scope),
- Line => Int (Get_Logical_Line_Number (Ref.Loc)),
+ Line => Nat (Get_Logical_Line_Number (Ref.Loc)),
Rtype => Typ,
- Col => Int (Get_Column_Number (Ref.Loc))));
+ Col => Nat (Get_Column_Number (Ref.Loc))));
end;
end loop;
declare
Str : constant String_Id :=
Strval (Get_Pragma_Arg (Arg2));
- Len : constant Int := String_Length (Str);
+ Len : constant Nat := String_Length (Str);
Cont : Boolean;
Ptr : Nat;
CC : Char_Code;
Check_Arg_Count (1);
if Nkind (A) = N_String_Literal then
- S := Strval (A);
+ S := Strval (A);
declare
Slen : constant Natural := Natural (String_Length (S));
procedure Set_Encoded_Interface_Name (E : Entity_Id; S : Node_Id) is
Str : constant String_Id := Strval (S);
- Len : constant Int := String_Length (Str);
+ Len : constant Nat := String_Length (Str);
CC : Char_Code;
C : Character;
- J : Int;
+ J : Pos;
Hex : constant array (0 .. 15) of Character := "0123456789abcdef";
New_Scope => Current_Scope,
New_Sloc => Loc);
+ -- Propagate dimension information, if any.
+
+ Copy_Dimensions (Default_Value (F), Actval);
+
if Is_Concurrent_Type (Scope (Nam))
and then Has_Discriminants (Scope (Nam))
then
-- Determine whether an arbitrary node appears in a check node
function Within_Subprogram_Call (Nod : Node_Id) return Boolean;
- -- Determine whether an arbitrary node appears in a procedure call
+ -- Determine whether an arbitrary node appears in a subprogram call
function Within_Volatile_Function (Id : Entity_Id) return Boolean;
-- Determine whether an arbitrary entity appears in a volatile
Par := Nod;
while Present (Par) loop
if Nkind_In (Par, N_Function_Call,
- N_Procedure_Call_Statement)
+ N_Procedure_Call_Statement,
+ N_Entry_Call_Statement)
then
return True;
-- --
-- B o d y --
-- --
--- Copyright (C) 2013-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2013-2015, 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- --
T : FPT_Mode_Entry renames
FPT_Mode_Table (FPT_Mode_Index_For (S_Float));
begin
- Float_Size := Int (T.SIZE);
+ Float_Size := Pos (T.SIZE);
end;
declare
T : FPT_Mode_Entry renames
FPT_Mode_Table (FPT_Mode_Index_For (S_Long_Float));
begin
- Double_Size := Int (T.SIZE);
+ Double_Size := Pos (T.SIZE);
end;
declare
T : FPT_Mode_Entry renames
FPT_Mode_Table (FPT_Mode_Index_For (S_Long_Long_Float));
begin
- Long_Double_Size := Int (T.SIZE);
+ Long_Double_Size := Pos (T.SIZE);
end;
end if;
-- String_Chars table all at once.
S_First : constant Int := Strings.Table (S).String_Index;
- S_Len : constant Int := String_Length (S);
+ S_Len : constant Nat := String_Length (S);
Old_Last : constant Int := String_Chars.Last;
New_Last : constant Int := Old_Last + S_Len;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, 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- --
-- Base is defined to allow efficient execution of the primitive operations
-- (a0, b0, c0) defined in the section "The Classical Algorithms"
- -- (sec. 4.3.1) of Donald Knuth's "The Art of Computer Programming",
+ -- (sec. 4.3.1) of Donald Knuth's "The Art of Computer Programming",
-- Vol. 2. These algorithms are used in this package. In particular,
-- the product of two single digits in this base fits in a 32-bit integer.