exp_aggr.adb (Packed_Array_Aggregate_Handled): The values of the bounds can be negative, and must be declared Int, not Nat.
* exp_aggr.adb (Packed_Array_Aggregate_Handled): The values of the bounds can be negative, and must be declared Int, not Nat. * sem_elim.adb (Line_Num_Match): Correct wrong code when index in an array is checked after using the index in the array. * makegpr.adb (Add_Switches): Check if there is a package for the processor. If there is no package, do not look for switches. From-SVN: r92835
This commit is contained in:
parent
050d31e815
commit
42de004476
@ -5019,8 +5019,8 @@ package body Exp_Aggr is
|
|||||||
-- Otherwise we are all positional, so convert to proper value
|
-- Otherwise we are all positional, so convert to proper value
|
||||||
|
|
||||||
declare
|
declare
|
||||||
Lov : constant Nat := UI_To_Int (Lob);
|
Lov : constant Int := UI_To_Int (Lob);
|
||||||
Hiv : constant Nat := UI_To_Int (Hib);
|
Hiv : constant Int := UI_To_Int (Hib);
|
||||||
|
|
||||||
Len : constant Nat := Int'Max (0, Hiv - Lov + 1);
|
Len : constant Nat := Int'Max (0, Hiv - Lov + 1);
|
||||||
-- The length of the array (number of elements)
|
-- The length of the array (number of elements)
|
||||||
|
@ -945,55 +945,56 @@ package body Makegpr is
|
|||||||
Pkg := Value_Of (Name_Compiler, Data.Decl.Packages);
|
Pkg := Value_Of (Name_Compiler, Data.Decl.Packages);
|
||||||
end case;
|
end case;
|
||||||
|
|
||||||
-- Get the Switches ("file name"), if they exist
|
if Pkg /= No_Package then
|
||||||
|
-- Get the Switches ("file name"), if they exist
|
||||||
|
|
||||||
Switches_Array := Prj.Util.Value_Of
|
Switches_Array := Prj.Util.Value_Of
|
||||||
(Name => Name_Switches,
|
(Name => Name_Switches,
|
||||||
In_Arrays =>
|
|
||||||
Packages.Table (Pkg).Decl.Arrays);
|
|
||||||
|
|
||||||
Switches :=
|
|
||||||
Prj.Util.Value_Of
|
|
||||||
(Index => File_Name,
|
|
||||||
Src_Index => 0,
|
|
||||||
In_Array => Switches_Array);
|
|
||||||
|
|
||||||
-- Otherwise, get the Default_Switches ("language"), if they exist
|
|
||||||
|
|
||||||
if Switches = Nil_Variable_Value then
|
|
||||||
Defaults := Prj.Util.Value_Of
|
|
||||||
(Name => Name_Default_Switches,
|
|
||||||
In_Arrays => Packages.Table (Pkg).Decl.Arrays);
|
In_Arrays => Packages.Table (Pkg).Decl.Arrays);
|
||||||
Switches := Prj.Util.Value_Of
|
|
||||||
(Index => Language_Names.Table (Language),
|
|
||||||
Src_Index => 0,
|
|
||||||
In_Array => Defaults);
|
|
||||||
end if;
|
|
||||||
|
|
||||||
-- If there are switches, add them to Arguments
|
Switches :=
|
||||||
|
Prj.Util.Value_Of
|
||||||
|
(Index => File_Name,
|
||||||
|
Src_Index => 0,
|
||||||
|
In_Array => Switches_Array);
|
||||||
|
|
||||||
if Switches /= Nil_Variable_Value then
|
-- Otherwise, get the Default_Switches ("language"), if they exist
|
||||||
Element_Id := Switches.Values;
|
|
||||||
while Element_Id /= Nil_String loop
|
|
||||||
Element := String_Elements.Table (Element_Id);
|
|
||||||
|
|
||||||
if Element.Value /= No_Name then
|
if Switches = Nil_Variable_Value then
|
||||||
Get_Name_String (Element.Value);
|
Defaults := Prj.Util.Value_Of
|
||||||
|
(Name => Name_Default_Switches,
|
||||||
|
In_Arrays => Packages.Table (Pkg).Decl.Arrays);
|
||||||
|
Switches := Prj.Util.Value_Of
|
||||||
|
(Index => Language_Names.Table (Language),
|
||||||
|
Src_Index => 0,
|
||||||
|
In_Array => Defaults);
|
||||||
|
end if;
|
||||||
|
|
||||||
if not Quiet_Output then
|
-- If there are switches, add them to Arguments
|
||||||
|
|
||||||
-- When not in quiet output (no -q), check that the switch
|
if Switches /= Nil_Variable_Value then
|
||||||
-- is not the concatenation of several valid switches,
|
Element_Id := Switches.Values;
|
||||||
-- such as "-g -v". If it is, issue a warning.
|
while Element_Id /= Nil_String loop
|
||||||
|
Element := String_Elements.Table (Element_Id);
|
||||||
|
|
||||||
Check (Option => Name_Buffer (1 .. Name_Len));
|
if Element.Value /= No_Name then
|
||||||
|
Get_Name_String (Element.Value);
|
||||||
|
|
||||||
|
if not Quiet_Output then
|
||||||
|
|
||||||
|
-- When not in quiet output (no -q), check that the
|
||||||
|
-- switch is not the concatenation of several valid
|
||||||
|
-- switches, such as "-g -v". If it is, issue a warning.
|
||||||
|
|
||||||
|
Check (Option => Name_Buffer (1 .. Name_Len));
|
||||||
|
end if;
|
||||||
|
|
||||||
|
Add_Argument (Name_Buffer (1 .. Name_Len), True);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Add_Argument (Name_Buffer (1 .. Name_Len), True);
|
Element_Id := Element.Next;
|
||||||
end if;
|
end loop;
|
||||||
|
end if;
|
||||||
Element_Id := Element.Next;
|
|
||||||
end loop;
|
|
||||||
end if;
|
end if;
|
||||||
end Add_Switches;
|
end Add_Switches;
|
||||||
|
|
||||||
|
@ -521,14 +521,14 @@ package body Sem_Elim is
|
|||||||
if Get_Physical_Line_Number (P) =
|
if Get_Physical_Line_Number (P) =
|
||||||
Physical_Line_Number (N)
|
Physical_Line_Number (N)
|
||||||
then
|
then
|
||||||
while Sloc_Trace (Idx) /= '['
|
while Idx <= Last and then
|
||||||
and then Idx <= Last
|
Sloc_Trace (Idx) /= '['
|
||||||
loop
|
loop
|
||||||
Idx := Idx + 1;
|
Idx := Idx + 1;
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
if Sloc_Trace (Idx) = '['
|
if Idx <= Last and then
|
||||||
and then Idx < Last
|
Sloc_Trace (Idx) = '['
|
||||||
then
|
then
|
||||||
Idx := Idx + 1;
|
Idx := Idx + 1;
|
||||||
Idx := Skip_Spaces;
|
Idx := Skip_Spaces;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user