[multiple changes]
2015-11-25 Eric Botcazou <ebotcazou@adacore.com> * gnatlink.adb (Gnatlink): Do not reinstate -fsjlj for the linker from the switches saved in the ALI file but from the exception settings. 2015-11-25 Arnaud Charlet <charlet@adacore.com> * lib-xref-spark_specific.adb (Add_SPARK_Scope): Take entry families into account. * a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock, Clock_For_Interrupts): preconditions added. * a-extiin.ads (Clock): preconditions added. * par-ch3.adb (P_Declarative_Items): In case of misplaced aspect specifications, ensure that flag Done is properly set to continue parsing. From-SVN: r230879
This commit is contained in:
parent
7b52257cfa
commit
8e2d104ba2
|
@ -1,3 +1,20 @@
|
|||
2015-11-25 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnatlink.adb (Gnatlink): Do not reinstate -fsjlj for the linker
|
||||
from the switches saved in the ALI file but from the exception
|
||||
settings.
|
||||
|
||||
2015-11-25 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* lib-xref-spark_specific.adb
|
||||
(Add_SPARK_Scope): Take entry families into account.
|
||||
* a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock,
|
||||
Clock_For_Interrupts): preconditions added.
|
||||
* a-extiin.ads (Clock): preconditions added.
|
||||
* par-ch3.adb (P_Declarative_Items): In case of misplaced
|
||||
aspect specifications, ensure that flag Done is properly set to
|
||||
continue parsing.
|
||||
|
||||
2015-11-25 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* exp_util.adb (Remove_Side_Effects): Minimize extra temporaries
|
||||
|
|
|
@ -47,13 +47,16 @@ is
|
|||
CPU_Time_Unit : constant := Ada.Real_Time.Time_Unit;
|
||||
CPU_Tick : constant Ada.Real_Time.Time_Span;
|
||||
|
||||
use type Ada.Task_Identification.Task_Id;
|
||||
|
||||
function Clock
|
||||
(T : Ada.Task_Identification.Task_Id :=
|
||||
Ada.Task_Identification.Current_Task)
|
||||
return CPU_Time
|
||||
with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => T /= Ada.Task_Identification.Null_Task_Id;
|
||||
|
||||
function "+"
|
||||
(Left : CPU_Time;
|
||||
|
@ -105,9 +108,12 @@ is
|
|||
Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
|
||||
pragma Warnings (Off, "check will fail at run time");
|
||||
function Clock_For_Interrupts return CPU_Time with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => Interrupt_Clocks_Supported;
|
||||
pragma Warnings (On, "check will fail at run time");
|
||||
|
||||
private
|
||||
pragma SPARK_Mode (Off);
|
||||
|
|
|
@ -49,13 +49,16 @@ is
|
|||
CPU_Time_Unit : constant := 0.000001;
|
||||
CPU_Tick : constant Ada.Real_Time.Time_Span;
|
||||
|
||||
use type Ada.Task_Identification.Task_Id;
|
||||
|
||||
function Clock
|
||||
(T : Ada.Task_Identification.Task_Id :=
|
||||
Ada.Task_Identification.Current_Task)
|
||||
return CPU_Time
|
||||
with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => T /= Ada.Task_Identification.Null_Task_Id;
|
||||
|
||||
function "+"
|
||||
(Left : CPU_Time;
|
||||
|
@ -105,9 +108,12 @@ is
|
|||
Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
|
||||
pragma Warnings (Off, "check will fail at run time");
|
||||
function Clock_For_Interrupts return CPU_Time with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => Interrupt_Clocks_Supported;
|
||||
pragma Warnings (On, "check will fail at run time");
|
||||
|
||||
private
|
||||
pragma SPARK_Mode (Off);
|
||||
|
|
|
@ -38,13 +38,16 @@ is
|
|||
CPU_Time_Unit : constant := 0.000001;
|
||||
CPU_Tick : constant Ada.Real_Time.Time_Span;
|
||||
|
||||
use type Ada.Task_Identification.Task_Id;
|
||||
|
||||
function Clock
|
||||
(T : Ada.Task_Identification.Task_Id :=
|
||||
Ada.Task_Identification.Current_Task)
|
||||
return CPU_Time
|
||||
with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => T /= Ada.Task_Identification.Null_Task_Id;
|
||||
|
||||
function "+"
|
||||
(Left : CPU_Time;
|
||||
|
@ -96,9 +99,12 @@ is
|
|||
Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
|
||||
|
||||
pragma Warnings (Off, "check will fail at run time");
|
||||
function Clock_For_Interrupts return CPU_Time with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => Interrupt_Clocks_Supported;
|
||||
pragma Warnings (On, "check will fail at run time");
|
||||
|
||||
private
|
||||
pragma SPARK_Mode (Off);
|
||||
|
|
|
@ -25,7 +25,8 @@ is
|
|||
function Clock (Interrupt : Ada.Interrupts.Interrupt_ID) return CPU_Time
|
||||
with
|
||||
Volatile_Function,
|
||||
Global => Ada.Real_Time.Clock_Time;
|
||||
Global => Ada.Real_Time.Clock_Time,
|
||||
Pre => Separate_Interrupt_Clocks_Supported;
|
||||
|
||||
function Supported (Interrupt : Ada.Interrupts.Interrupt_ID) return Boolean
|
||||
with
|
||||
|
|
|
@ -1588,6 +1588,16 @@ begin
|
|||
end if;
|
||||
end;
|
||||
end loop;
|
||||
|
||||
-- Pass -fsjlj to the linker with back-end SJLJ exceptions
|
||||
|
||||
if not ALIs.Table (A).Frontend_Exceptions
|
||||
and then not ALIs.Table (A).Zero_Cost_Exceptions
|
||||
then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table
|
||||
(Linker_Options.Last) := new String'("-fsjlj");
|
||||
end if;
|
||||
end if;
|
||||
end;
|
||||
end if;
|
||||
|
|
|
@ -260,6 +260,7 @@ package body SPARK_Specific is
|
|||
|
||||
case Ekind (E) is
|
||||
when E_Entry
|
||||
| E_Entry_Family
|
||||
| E_Function
|
||||
| E_Generic_Function
|
||||
| E_Generic_Package
|
||||
|
@ -330,7 +331,7 @@ package body SPARK_Specific is
|
|||
|
||||
function Is_SPARK_Scope (E : Entity_Id) return Boolean;
|
||||
-- Return whether the entity or reference scope meets requirements for
|
||||
-- being an SPARK scope.
|
||||
-- being a SPARK scope.
|
||||
|
||||
function Lt (Op1 : Natural; Op2 : Natural) return Boolean;
|
||||
-- Comparison function for Sort call
|
||||
|
|
|
@ -4441,14 +4441,14 @@ package body Ch3 is
|
|||
|
||||
else
|
||||
Error_Msg_SC ("aspect specifications not allowed here");
|
||||
|
||||
-- Assume that this is a misplaced aspect specification
|
||||
-- within a declarative list. After discarding the
|
||||
-- misplaced aspects we can continue the scan.
|
||||
|
||||
Done := False;
|
||||
end if;
|
||||
|
||||
-- Assume that this is a misplaced aspect specification within
|
||||
-- a declarative list. After discarding the misplaced aspects
|
||||
-- we can continue the scan.
|
||||
|
||||
Done := False;
|
||||
|
||||
declare
|
||||
Dummy_Node : constant Node_Id :=
|
||||
New_Node (N_Package_Specification, Token_Ptr);
|
||||
|
|
Loading…
Reference in New Issue