Commit 06effe87 by Arnaud Charlet

[multiple changes]

2004-02-04  Robert Dewar  <dewar@gnat.com>

	* 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb,
	ali.ads, gprcmd.adb: Minor reformatting

	* bindgen.adb: Output restrictions string for new style restrictions
	handling

	* impunit.adb: Add s-rident.ads (System.Rident) and
	s-restri (System.Restrictions)

	* lib-writ.adb: Fix bug in writing restrictions string (last few
	entries wrong)

	* s-restri.ads, s-restri.adb: Change name Restrictions to
	Run_Time_Restrictions to avoid conflict with package name.
	Add circuit to read and acquire run time restrictions.

2004-02-04  Jose Ruiz  <ruiz@act-europe.fr>

	* restrict.ads, restrict.adb: Use the new restriction
	No_Task_Attributes_Package instead of the old No_Task_Attributes.

	* sem_prag.adb: No_Task_Attributes is a synonym of
	No_Task_Attributes_Package.

	* snames.ads, snames.adb: New entry for proper handling of
	No_Task_Attributes.

	* s-rident.ads: Adding restriction No_Task_Attributes_Package
	(AI-00249) that supersedes the GNAT specific restriction
	No_Task_Attributes.

2004-02-04  Ed Schonberg  <schonberg@gnat.com>

	* sem_prag.adb:
	(Analyze_Pragma, case Warnings): In an inlined body, as in an instance
	 body, an identifier may be wrapped in an unchecked conversion.

2004-02-04  Vincent Celier  <celier@gnat.com>

	* lib-writ.ads: Comment update for the W lines

	* bld.adb: (Expression): An empty string list is static

	* fname-uf.adb: Minor comment update

	* fname-uf.ads: (Get_File_Name): Document new parameter May_Fail

	* gnatbind.adb: Initialize Cumulative_Restrictions with the
	restrictions on the target.

From-SVN: r77233
parent c2379679
...@@ -141,7 +141,6 @@ package body System.Task_Primitives.Operations is ...@@ -141,7 +141,6 @@ package body System.Task_Primitives.Operations is
procedure Stack_Guard (T : ST.Task_ID; On : Boolean) is procedure Stack_Guard (T : ST.Task_ID; On : Boolean) is
pragma Unreferenced (T); pragma Unreferenced (T);
pragma Unreferenced (On); pragma Unreferenced (On);
begin begin
null; null;
end Stack_Guard; end Stack_Guard;
...@@ -251,7 +250,6 @@ package body System.Task_Primitives.Operations is ...@@ -251,7 +250,6 @@ package body System.Task_Primitives.Operations is
procedure Finalize_Lock (L : access Lock) is procedure Finalize_Lock (L : access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_destroy (L); Result := pthread_mutex_destroy (L);
pragma Assert (Result = 0); pragma Assert (Result = 0);
...@@ -259,7 +257,6 @@ package body System.Task_Primitives.Operations is ...@@ -259,7 +257,6 @@ package body System.Task_Primitives.Operations is
procedure Finalize_Lock (L : access RTS_Lock) is procedure Finalize_Lock (L : access RTS_Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_destroy (L); Result := pthread_mutex_destroy (L);
pragma Assert (Result = 0); pragma Assert (Result = 0);
...@@ -271,10 +268,8 @@ package body System.Task_Primitives.Operations is ...@@ -271,10 +268,8 @@ package body System.Task_Primitives.Operations is
procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_lock (L); Result := pthread_mutex_lock (L);
Ceiling_Violation := Result = FUNC_ERR and then errno = EINVAL; Ceiling_Violation := Result = FUNC_ERR and then errno = EINVAL;
pragma Assert (Result /= FUNC_ERR); pragma Assert (Result /= FUNC_ERR);
end Write_Lock; end Write_Lock;
...@@ -283,7 +278,6 @@ package body System.Task_Primitives.Operations is ...@@ -283,7 +278,6 @@ package body System.Task_Primitives.Operations is
(L : access RTS_Lock; Global_Lock : Boolean := False) (L : access RTS_Lock; Global_Lock : Boolean := False)
is is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
if not Single_Lock or else Global_Lock then if not Single_Lock or else Global_Lock then
Result := pthread_mutex_lock (L); Result := pthread_mutex_lock (L);
...@@ -293,7 +287,6 @@ package body System.Task_Primitives.Operations is ...@@ -293,7 +287,6 @@ package body System.Task_Primitives.Operations is
procedure Write_Lock (T : Task_ID) is procedure Write_Lock (T : Task_ID) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
if not Single_Lock then if not Single_Lock then
Result := pthread_mutex_lock (T.Common.LL.L'Access); Result := pthread_mutex_lock (T.Common.LL.L'Access);
...@@ -316,7 +309,6 @@ package body System.Task_Primitives.Operations is ...@@ -316,7 +309,6 @@ package body System.Task_Primitives.Operations is
procedure Unlock (L : access Lock) is procedure Unlock (L : access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_unlock (L); Result := pthread_mutex_unlock (L);
pragma Assert (Result = 0); pragma Assert (Result = 0);
...@@ -324,7 +316,6 @@ package body System.Task_Primitives.Operations is ...@@ -324,7 +316,6 @@ package body System.Task_Primitives.Operations is
procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
if not Single_Lock or else Global_Lock then if not Single_Lock or else Global_Lock then
Result := pthread_mutex_unlock (L); Result := pthread_mutex_unlock (L);
...@@ -334,7 +325,6 @@ package body System.Task_Primitives.Operations is ...@@ -334,7 +325,6 @@ package body System.Task_Primitives.Operations is
procedure Unlock (T : Task_ID) is procedure Unlock (T : Task_ID) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
if not Single_Lock then if not Single_Lock then
Result := pthread_mutex_unlock (T.Common.LL.L'Access); Result := pthread_mutex_unlock (T.Common.LL.L'Access);
...@@ -543,7 +533,6 @@ package body System.Task_Primitives.Operations is ...@@ -543,7 +533,6 @@ package body System.Task_Primitives.Operations is
Reason : System.Tasking.Task_States) Reason : System.Tasking.Task_States)
is is
pragma Unreferenced (Reason); pragma Unreferenced (Reason);
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_cond_signal (T.Common.LL.CV'Access); Result := pthread_cond_signal (T.Common.LL.CV'Access);
...@@ -813,10 +802,8 @@ package body System.Task_Primitives.Operations is ...@@ -813,10 +802,8 @@ package body System.Task_Primitives.Operations is
procedure Exit_Task is procedure Exit_Task is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_set_ada_tcb (pthread_self, System.Null_Address); Result := pthread_set_ada_tcb (pthread_self, System.Null_Address);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Exit_Task; end Exit_Task;
...@@ -826,7 +813,6 @@ package body System.Task_Primitives.Operations is ...@@ -826,7 +813,6 @@ package body System.Task_Primitives.Operations is
procedure Abort_Task (T : Task_ID) is procedure Abort_Task (T : Task_ID) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := Result :=
pthread_kill (T.Common.LL.Thread, pthread_kill (T.Common.LL.Thread,
...@@ -854,7 +840,6 @@ package body System.Task_Primitives.Operations is ...@@ -854,7 +840,6 @@ package body System.Task_Primitives.Operations is
function Check_No_Locks (Self_ID : ST.Task_ID) return Boolean is function Check_No_Locks (Self_ID : ST.Task_ID) return Boolean is
pragma Unreferenced (Self_ID); pragma Unreferenced (Self_ID);
begin begin
return True; return True;
end Check_No_Locks; end Check_No_Locks;
...@@ -961,9 +946,10 @@ package body System.Task_Primitives.Operations is ...@@ -961,9 +946,10 @@ package body System.Task_Primitives.Operations is
if Result = FUNC_ERR then if Result = FUNC_ERR then
raise Storage_Error; -- Insufficient resources. raise Storage_Error; -- Insufficient resources.
end if; end if;
end Initialize_Athread_Library; end Initialize_Athread_Library;
-- Package initialization
begin begin
Initialize_Athread_Library; Initialize_Athread_Library;
end System.Task_Primitives.Operations; end System.Task_Primitives.Operations;
...@@ -77,16 +77,14 @@ package body System.Task_Info is ...@@ -77,16 +77,14 @@ package body System.Task_Info is
--------- ---------
function "+" (R : Resource_T) return Resource_Vector_T is function "+" (R : Resource_T) return Resource_Vector_T is
Result : Resource_Vector_T := NO_RESOURCES; Result : Resource_Vector_T := NO_RESOURCES;
begin begin
Result (Resource_T'Pos (R)) := True; Result (Resource_T'Pos (R)) := True;
return Result; return Result;
end "+"; end "+";
function "+" (R1, R2 : Resource_T) return Resource_Vector_T is function "+" (R1, R2 : Resource_T) return Resource_Vector_T is
Result : Resource_Vector_T := NO_RESOURCES; Result : Resource_Vector_T := NO_RESOURCES;
begin begin
Result (Resource_T'Pos (R1)) := True; Result (Resource_T'Pos (R1)) := True;
Result (Resource_T'Pos (R2)) := True; Result (Resource_T'Pos (R2)) := True;
...@@ -94,44 +92,37 @@ package body System.Task_Info is ...@@ -94,44 +92,37 @@ package body System.Task_Info is
end "+"; end "+";
function "+" function "+"
(R : Resource_T; (R : Resource_T;
S : Resource_Vector_T) S : Resource_Vector_T) return Resource_Vector_T
return Resource_Vector_T
is is
Result : Resource_Vector_T := S; Result : Resource_Vector_T := S;
begin begin
Result (Resource_T'Pos (R)) := True; Result (Resource_T'Pos (R)) := True;
return Result; return Result;
end "+"; end "+";
function "+" function "+"
(S : Resource_Vector_T; (S : Resource_Vector_T;
R : Resource_T) R : Resource_T) return Resource_Vector_T
return Resource_Vector_T
is is
Result : Resource_Vector_T := S; Result : Resource_Vector_T := S;
begin begin
Result (Resource_T'Pos (R)) := True; Result (Resource_T'Pos (R)) := True;
return Result; return Result;
end "+"; end "+";
function "+" (S1, S2 : Resource_Vector_T) return Resource_Vector_T is function "+" (S1, S2 : Resource_Vector_T) return Resource_Vector_T is
Result : Resource_Vector_T; Result : Resource_Vector_T;
begin begin
Result := S1 or S2; Result := S1 or S2;
return Result; return Result;
end "+"; end "+";
function "-" function "-"
(S : Resource_Vector_T; (S : Resource_Vector_T;
R : Resource_T) R : Resource_T) return Resource_Vector_T
return Resource_Vector_T
is is
Result : Resource_Vector_T := S; Result : Resource_Vector_T := S;
begin begin
Result (Resource_T'Pos (R)) := False; Result (Resource_T'Pos (R)) := False;
return Result; return Result;
...@@ -177,21 +168,23 @@ package body System.Task_Info is ...@@ -177,21 +168,23 @@ package body System.Task_Info is
end if; end if;
if Attr.NDPRI /= NDP_NONE then if Attr.NDPRI /= NDP_NONE then
-- ??? why is that comment out, should it be removed ?
-- ??? why is this commented out, should it be removed ?
-- if Geteuid /= 0 then -- if Geteuid /= 0 then
-- raise Permission_Error; -- raise Permission_Error;
-- end if; -- end if;
Status := sproc_attr_setprio Status :=
(Sproc_Attr'Unrestricted_Access, sproc_attr_setprio
int (Attr.NDPRI)); (Sproc_Attr'Unrestricted_Access, int (Attr.NDPRI));
end if; end if;
Status := sproc_create Status :=
(Sproc'Unrestricted_Access, sproc_create
Sproc_Attr'Unrestricted_Access, (Sproc'Unrestricted_Access,
null, Sproc_Attr'Unrestricted_Access,
System.Null_Address); null,
System.Null_Address);
if Status /= 0 then if Status /= 0 then
Status := sproc_attr_destroy (Sproc_Attr'Unrestricted_Access); Status := sproc_attr_destroy (Sproc_Attr'Unrestricted_Access);
...@@ -199,7 +192,6 @@ package body System.Task_Info is ...@@ -199,7 +192,6 @@ package body System.Task_Info is
end if; end if;
Status := sproc_attr_destroy (Sproc_Attr'Unrestricted_Access); Status := sproc_attr_destroy (Sproc_Attr'Unrestricted_Access);
end if; end if;
if Status /= 0 then if Status /= 0 then
...@@ -217,12 +209,10 @@ package body System.Task_Info is ...@@ -217,12 +209,10 @@ package body System.Task_Info is
(Sproc_Resources : Resource_Vector_T := NO_RESOURCES; (Sproc_Resources : Resource_Vector_T := NO_RESOURCES;
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE) return sproc_t
return sproc_t
is is
Attr : constant Sproc_Attributes := Attr : constant Sproc_Attributes :=
(Sproc_Resources, CPU, Resident, NDPRI); (Sproc_Resources, CPU, Resident, NDPRI);
begin begin
return New_Sproc (Attr); return New_Sproc (Attr);
end New_Sproc; end New_Sproc;
...@@ -233,8 +223,7 @@ package body System.Task_Info is ...@@ -233,8 +223,7 @@ package body System.Task_Info is
function Unbound_Thread_Attributes function Unbound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0) Thread_Timeslice : Duration := 0.0) return Thread_Attributes
return Thread_Attributes
is is
begin begin
return (False, Thread_Resources, Thread_Timeslice); return (False, Thread_Resources, Thread_Timeslice);
...@@ -265,11 +254,10 @@ package body System.Task_Info is ...@@ -265,11 +254,10 @@ package body System.Task_Info is
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE)
return Thread_Attributes return Thread_Attributes
is is
Sproc : constant sproc_t := New_Sproc Sproc : constant sproc_t := New_Sproc
(Sproc_Resources, CPU, Resident, NDPRI); (Sproc_Resources, CPU, Resident, NDPRI);
begin begin
return (True, Thread_Resources, Thread_Timeslice, Sproc); return (True, Thread_Resources, Thread_Timeslice, Sproc);
end Bound_Thread_Attributes; end Bound_Thread_Attributes;
...@@ -280,8 +268,7 @@ package body System.Task_Info is ...@@ -280,8 +268,7 @@ package body System.Task_Info is
function New_Unbound_Thread_Attributes function New_Unbound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0) Thread_Timeslice : Duration := 0.0) return Task_Info_Type
return Task_Info_Type
is is
begin begin
return new Thread_Attributes' return new Thread_Attributes'
...@@ -295,8 +282,7 @@ package body System.Task_Info is ...@@ -295,8 +282,7 @@ package body System.Task_Info is
function New_Bound_Thread_Attributes function New_Bound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0; Thread_Timeslice : Duration := 0.0;
Sproc : sproc_t) Sproc : sproc_t) return Task_Info_Type
return Task_Info_Type
is is
begin begin
return new Thread_Attributes' return new Thread_Attributes'
...@@ -314,11 +300,10 @@ package body System.Task_Info is ...@@ -314,11 +300,10 @@ package body System.Task_Info is
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE)
return Task_Info_Type return Task_Info_Type
is is
Sproc : constant sproc_t := New_Sproc Sproc : constant sproc_t := New_Sproc
(Sproc_Resources, CPU, Resident, NDPRI); (Sproc_Resources, CPU, Resident, NDPRI);
begin begin
return new Thread_Attributes' return new Thread_Attributes'
(True, Thread_Resources, Thread_Timeslice, Sproc); (True, Thread_Resources, Thread_Timeslice, Sproc);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -63,14 +63,14 @@ package System.Task_Info is ...@@ -63,14 +63,14 @@ package System.Task_Info is
-- Each thread has a number of attributes that dictate it's scheduling. -- Each thread has a number of attributes that dictate it's scheduling.
-- These attributes are: -- These attributes are:
--
-- Bound_To_Sproc: whether the thread is bound to a specific sproc -- Bound_To_Sproc: whether the thread is bound to a specific sproc
-- for its entire lifetime. -- for its entire lifetime.
--
-- Timeslice: Amount of time that a thread is allowed to execute -- Timeslice: Amount of time that a thread is allowed to execute
-- before the system yeilds control to another thread -- before the system yeilds control to another thread
-- of equal priority. -- of equal priority.
--
-- Resource_Vector: A bitmask used to control the binding of threads -- Resource_Vector: A bitmask used to control the binding of threads
-- to sprocs. -- to sprocs.
-- --
...@@ -113,33 +113,27 @@ package System.Task_Info is ...@@ -113,33 +113,27 @@ package System.Task_Info is
package Resource_Vector_Functions is package Resource_Vector_Functions is
function "+" function "+"
(R : Resource_T) (R : Resource_T) return Resource_Vector_T;
return Resource_Vector_T;
function "+" function "+"
(R1 : Resource_T; (R1 : Resource_T;
R2 : Resource_T) R2 : Resource_T) return Resource_Vector_T;
return Resource_Vector_T;
function "+" function "+"
(R : Resource_T; (R : Resource_T;
S : Resource_Vector_T) S : Resource_Vector_T) return Resource_Vector_T;
return Resource_Vector_T;
function "+" function "+"
(S : Resource_Vector_T; (S : Resource_Vector_T;
R : Resource_T) R : Resource_T) return Resource_Vector_T;
return Resource_Vector_T;
function "+" function "+"
(S1 : Resource_Vector_T; (S1 : Resource_Vector_T;
S2 : Resource_Vector_T) S2 : Resource_Vector_T) return Resource_Vector_T;
return Resource_Vector_T;
function "-" function "-"
(S : Resource_Vector_T; (S : Resource_Vector_T;
R : Resource_T) R : Resource_T) return Resource_Vector_T;
return Resource_Vector_T;
end Resource_Vector_Functions; end Resource_Vector_Functions;
---------------------- ----------------------
...@@ -208,8 +202,7 @@ package System.Task_Info is ...@@ -208,8 +202,7 @@ package System.Task_Info is
(Sproc_Resources : Resource_Vector_T := NO_RESOURCES; (Sproc_Resources : Resource_Vector_T := NO_RESOURCES;
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE) return sproc_t;
return sproc_t;
-- Allocates a sproc_t control structure and creates the -- Allocates a sproc_t control structure and creates the
-- corresponding sproc. -- corresponding sproc.
...@@ -239,14 +232,12 @@ package System.Task_Info is ...@@ -239,14 +232,12 @@ package System.Task_Info is
function Unbound_Thread_Attributes function Unbound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0) Thread_Timeslice : Duration := 0.0) return Thread_Attributes;
return Thread_Attributes;
function Bound_Thread_Attributes function Bound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0; Thread_Timeslice : Duration := 0.0;
Sproc : sproc_t) Sproc : sproc_t) return Thread_Attributes;
return Thread_Attributes;
function Bound_Thread_Attributes function Bound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
...@@ -255,20 +246,19 @@ package System.Task_Info is ...@@ -255,20 +246,19 @@ package System.Task_Info is
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE)
return Thread_Attributes; return Thread_Attributes;
type Task_Info_Type is access all Thread_Attributes; type Task_Info_Type is access all Thread_Attributes;
function New_Unbound_Thread_Attributes function New_Unbound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0) Thread_Timeslice : Duration := 0.0)
return Task_Info_Type; return Task_Info_Type;
function New_Bound_Thread_Attributes function New_Bound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
Thread_Timeslice : Duration := 0.0; Thread_Timeslice : Duration := 0.0;
Sproc : sproc_t) Sproc : sproc_t) return Task_Info_Type;
return Task_Info_Type;
function New_Bound_Thread_Attributes function New_Bound_Thread_Attributes
(Thread_Resources : Resource_Vector_T := NO_RESOURCES; (Thread_Resources : Resource_Vector_T := NO_RESOURCES;
...@@ -277,7 +267,7 @@ package System.Task_Info is ...@@ -277,7 +267,7 @@ package System.Task_Info is
CPU : CPU_Number := ANY_CPU; CPU : CPU_Number := ANY_CPU;
Resident : Page_Locking := NOLOCK; Resident : Page_Locking := NOLOCK;
NDPRI : Non_Degrading_Priority := NDP_NONE) NDPRI : Non_Degrading_Priority := NDP_NONE)
return Task_Info_Type; return Task_Info_Type;
Unspecified_Task_Info : constant Task_Info_Type := null; Unspecified_Task_Info : constant Task_Info_Type := null;
......
2004-02-04 Robert Dewar <dewar@gnat.com>
* 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb,
ali.ads, gprcmd.adb: Minor reformatting
* bindgen.adb: Output restrictions string for new style restrictions
handling
* impunit.adb: Add s-rident.ads (System.Rident) and
s-restri (System.Restrictions)
* lib-writ.adb: Fix bug in writing restrictions string (last few
entries wrong)
* s-restri.ads, s-restri.adb: Change name Restrictions to
Run_Time_Restrictions to avoid conflict with package name.
Add circuit to read and acquire run time restrictions.
2004-02-04 Jose Ruiz <ruiz@act-europe.fr>
* restrict.ads, restrict.adb: Use the new restriction
No_Task_Attributes_Package instead of the old No_Task_Attributes.
* sem_prag.adb: No_Task_Attributes is a synonym of
No_Task_Attributes_Package.
* snames.ads, snames.adb: New entry for proper handling of
No_Task_Attributes.
* s-rident.ads: Adding restriction No_Task_Attributes_Package
(AI-00249) that supersedes the GNAT specific restriction
No_Task_Attributes.
2004-02-04 Ed Schonberg <schonberg@gnat.com>
* sem_prag.adb:
(Analyze_Pragma, case Warnings): In an inlined body, as in an instance
body, an identifier may be wrapped in an unchecked conversion.
2004-02-04 Vincent Celier <celier@gnat.com>
* lib-writ.ads: Comment update for the W lines
* bld.adb: (Expression): An empty string list is static
* fname-uf.adb: Minor comment update
* fname-uf.ads: (Get_File_Name): Document new parameter May_Fail
* gnatbind.adb: Initialize Cumulative_Restrictions with the
restrictions on the target.
2004-02-03 Kazu Hirata <kazu@cs.umass.edu> 2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* ada/trans.c (gigi): Use gen_rtx_SYMBOL_REF instead of * ada/trans.c (gigi): Use gen_rtx_SYMBOL_REF instead of
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
with Butil; use Butil; with Butil; use Butil;
with Debug; use Debug; with Debug; use Debug;
with Fname; use Fname; with Fname; use Fname;
with Namet; use Namet; with Namet; use Namet;
with Opt; use Opt; with Opt; use Opt;
with Osint; use Osint; with Osint; use Osint;
with Output; use Output; with Output; use Output;
package body ALI is package body ALI is
...@@ -105,8 +105,7 @@ package body ALI is ...@@ -105,8 +105,7 @@ package body ALI is
Err : Boolean; Err : Boolean;
Read_Xref : Boolean := False; Read_Xref : Boolean := False;
Read_Lines : String := ""; Read_Lines : String := "";
Ignore_Lines : String := "X") Ignore_Lines : String := "X") return ALI_Id
return ALI_Id
is is
P : Text_Ptr := T'First; P : Text_Ptr := T'First;
Line : Logical_Line_Number := 1; Line : Logical_Line_Number := 1;
...@@ -328,8 +327,10 @@ package body ALI is ...@@ -328,8 +327,10 @@ package body ALI is
-- Get_Name -- -- Get_Name --
-------------- --------------
function Get_Name (Lower : Boolean := False; function Get_Name
Ignore_Spaces : Boolean := False) return Name_Id is (Lower : Boolean := False;
Ignore_Spaces : Boolean := False) return Name_Id
is
begin begin
Name_Len := 0; Name_Len := 0;
Skip_Space; Skip_Space;
......
...@@ -814,8 +814,7 @@ package ALI is ...@@ -814,8 +814,7 @@ package ALI is
Err : Boolean; Err : Boolean;
Read_Xref : Boolean := False; Read_Xref : Boolean := False;
Read_Lines : String := ""; Read_Lines : String := "";
Ignore_Lines : String := "X") Ignore_Lines : String := "X") return ALI_Id;
return ALI_Id;
-- Given the text, T, of an ALI file, F, scan and store the information -- Given the text, T, of an ALI file, F, scan and store the information
-- from the file, and return the Id of the resulting entry in the ALI -- from the file, and return the Id of the resulting entry in the ALI
-- table. Switch settings may be modified as described above in the -- table. Switch settings may be modified as described above in the
......
...@@ -141,6 +141,16 @@ package body Bindgen is ...@@ -141,6 +141,16 @@ package body Bindgen is
procedure Gen_Output_File_C (Filename : String); procedure Gen_Output_File_C (Filename : String);
-- Generate output file (C code case) -- Generate output file (C code case)
procedure Gen_Restrictions_String_1;
-- Generate first restrictions string, which consists of the parameters
-- the first R line, as described in lib-writ.ads, with the restrictions
-- being those for the entire partition (from Cumulative_Restrictions).
procedure Gen_Restrictions_String_2;
-- Generate first restrictions string, which consists of the parameters
-- the second R line, as described in lib-writ.ads, with the restrictions
-- being those for the entire partition (from Cumulative_Restrictions).
procedure Gen_Versions_Ada; procedure Gen_Versions_Ada;
-- Output series of definitions for unit versions (Ada code case) -- Output series of definitions for unit versions (Ada code case)
...@@ -358,13 +368,15 @@ package body Bindgen is ...@@ -358,13 +368,15 @@ package body Bindgen is
Set_String (" Restrictions : constant String :="); Set_String (" Restrictions : constant String :=");
Write_Statement_Buffer; Write_Statement_Buffer;
Set_String (" """);
for J in All_Restrictions loop Set_String (" """);
null; Gen_Restrictions_String_1;
end loop; Set_String (""" &");
Write_Statement_Buffer;
Set_String (""";"); Set_String (" """);
Gen_Restrictions_String_2;
Set_String (""" & ASCII.Nul;");
Write_Statement_Buffer; Write_Statement_Buffer;
WBI (""); WBI ("");
...@@ -606,11 +618,8 @@ package body Bindgen is ...@@ -606,11 +618,8 @@ package body Bindgen is
-- Generate definition for restrictions string -- Generate definition for restrictions string
Set_String (" const char *restrictions = """); Set_String (" const char *restrictions = """);
Gen_Restrictions_String_1;
for J in All_Restrictions loop Gen_Restrictions_String_2;
null;
end loop;
Set_String (""";"); Set_String (""";");
Write_Statement_Buffer; Write_Statement_Buffer;
...@@ -2453,6 +2462,52 @@ package body Bindgen is ...@@ -2453,6 +2462,52 @@ package body Bindgen is
Close_Binder_Output; Close_Binder_Output;
end Gen_Output_File_C; end Gen_Output_File_C;
-------------------------------
-- Gen_Restrictions_String_1 --
-------------------------------
procedure Gen_Restrictions_String_1 is
begin
for R in All_Boolean_Restrictions loop
if Cumulative_Restrictions.Set (R) then
Set_Char ('r');
elsif Cumulative_Restrictions.Violated (R) then
Set_Char ('v');
else
Set_Char ('n');
end if;
end loop;
end Gen_Restrictions_String_1;
-------------------------------
-- Gen_Restrictions_String_2 --
-------------------------------
procedure Gen_Restrictions_String_2 is
begin
for RP in All_Parameter_Restrictions loop
if Cumulative_Restrictions.Set (RP) then
Set_Char ('r');
Set_Int (Int (Cumulative_Restrictions.Value (RP)));
else
Set_Char ('n');
end if;
if not Cumulative_Restrictions.Violated (RP)
or else RP not in Checked_Parameter_Restrictions
then
Set_Char ('n');
else
Set_Char ('v');
Set_Int (Int (Cumulative_Restrictions.Count (RP)));
if Cumulative_Restrictions.Unknown (RP) then
Set_Char ('+');
end if;
end if;
end loop;
end Gen_Restrictions_String_2;
---------------------- ----------------------
-- Gen_Versions_Ada -- -- Gen_Versions_Ada --
---------------------- ----------------------
......
...@@ -525,11 +525,16 @@ package body Bld is ...@@ -525,11 +525,16 @@ package body Bld is
First_Expression_In_List (Current_Term); First_Expression_In_List (Current_Term);
begin begin
if String_Node /= Empty_Node then if String_Node = Empty_Node then
-- If String_Node is nil, it is an empty list, -- If String_Node is nil, it is an empty list,
-- there is nothing to do -- set Expression_Kind if it is still Undecided
if Expression_Kind = Undecided then
Expression_Kind := Static_String;
end if;
else
Expression Expression
(Project => Project, (Project => Project,
First_Term => Tree.First_Term (String_Node), First_Term => Tree.First_Term (String_Node),
......
...@@ -123,8 +123,8 @@ package body Fname.UF is ...@@ -123,8 +123,8 @@ package body Fname.UF is
------------------- -------------------
function Get_File_Name function Get_File_Name
(Uname : Unit_Name_Type; (Uname : Unit_Name_Type;
Subunit : Boolean; Subunit : Boolean;
May_Fail : Boolean := False) return File_Name_Type May_Fail : Boolean := False) return File_Name_Type
is is
Unit_Char : Character; Unit_Char : Character;
...@@ -387,12 +387,12 @@ package body Fname.UF is ...@@ -387,12 +387,12 @@ package body Fname.UF is
-- If we are in the second search of the table, we accept -- If we are in the second search of the table, we accept
-- the file name without checking, because we know that -- the file name without checking, because we know that
-- the file does not exist. -- the file does not exist, except when May_Fail is True,
-- in which case we return No_File.
if No_File_Check then if No_File_Check then
if May_Fail then if May_Fail then
return No_File; return No_File;
else else
return Fnam; return Fnam;
end if; end if;
......
...@@ -44,14 +44,18 @@ package Fname.UF is ...@@ -44,14 +44,18 @@ package Fname.UF is
----------------- -----------------
function Get_File_Name function Get_File_Name
(Uname : Unit_Name_Type; (Uname : Unit_Name_Type;
Subunit : Boolean; Subunit : Boolean;
May_Fail : Boolean := False) return File_Name_Type; May_Fail : Boolean := False) return File_Name_Type;
-- This function returns the file name that corresponds to a given unit -- This function returns the file name that corresponds to a given unit
-- name, Uname. The Subunit parameter is set True for subunits, and -- name, Uname. The Subunit parameter is set True for subunits, and
-- false for all other kinds of units. The caller is responsible for -- false for all other kinds of units. The caller is responsible for
-- ensuring that the unit name meets the requirements given in package -- ensuring that the unit name meets the requirements given in package
-- Uname and described above. -- Uname and described above.
-- When May_Fail is True, if the file cannot be found, this function
-- returns No_File. When it is False, if the file cannot be found,
-- a file name compatible with one pattern Source_File_Name pragma is
-- returned.
procedure Initialize; procedure Initialize;
-- Initialize internal tables. This is called automatically when the -- Initialize internal tables. This is called automatically when the
......
...@@ -447,6 +447,12 @@ begin ...@@ -447,6 +447,12 @@ begin
Targparm.Get_Target_Parameters; Targparm.Get_Target_Parameters;
-- Initialize Cumulative_Restrictions with the restrictions on the target
-- scanned from the system.ads file. Then as we read ALI files, we will
-- accumulate additional restrictions specified in other files.
Cumulative_Restrictions := Targparm.Restrictions_On_Target;
-- On OpenVMS, when -L is used, all external names used in pragmas Export -- On OpenVMS, when -L is used, all external names used in pragmas Export
-- are in upper case. The reason is that on OpenVMS, the macro-assembler -- are in upper case. The reason is that on OpenVMS, the macro-assembler
-- MACASM-32, used to build Stand-Alone Libraries, only understands -- MACASM-32, used to build Stand-Alone Libraries, only understands
......
...@@ -113,6 +113,7 @@ procedure Gprcmd is ...@@ -113,6 +113,7 @@ procedure Gprcmd is
Put_Line Put_Line
(Standard_Error, (Standard_Error,
"bad call to gprcmd with" & Argument_Count'Img & " arguments."); "bad call to gprcmd with" & Argument_Count'Img & " arguments.");
for J in 0 .. Argument_Count loop for J in 0 .. Argument_Count loop
Put (Standard_Error, Argument (J) & " "); Put (Standard_Error, Argument (J) & " ");
end loop; end loop;
...@@ -473,9 +474,9 @@ begin ...@@ -473,9 +474,9 @@ begin
end if; end if;
end; end;
else -- Unknown command
-- Uknown command
else
Check_Args (False); Check_Args (False);
end if; end if;
end; end;
......
...@@ -297,6 +297,8 @@ package body Impunit is ...@@ -297,6 +297,8 @@ package body Impunit is
"s-assert", -- System.Assertions "s-assert", -- System.Assertions
"s-memory", -- System.Memory "s-memory", -- System.Memory
"s-parint", -- System.Partition_Interface "s-parint", -- System.Partition_Interface
"s-restri", -- System.Restrictions
"s-rident", -- System.Rident
"s-tasinf", -- System.Task_Info "s-tasinf", -- System.Task_Info
"s-wchcnv", -- System.Wch_Cnv "s-wchcnv", -- System.Wch_Cnv
"s-wchcon"); -- System.Wch_Con "s-wchcon"); -- System.Wch_Con
......
...@@ -691,7 +691,7 @@ package body Lib.Writ is ...@@ -691,7 +691,7 @@ package body Lib.Writ is
end loop; end loop;
end Write_With_Lines; end Write_With_Lines;
-- Start of processing for Writ_ALI -- Start of processing for Write_ALI
begin begin
-- We never write an ALI file if the original operating mode was -- We never write an ALI file if the original operating mode was
...@@ -919,7 +919,6 @@ package body Lib.Writ is ...@@ -919,7 +919,6 @@ package body Lib.Writ is
then then
if not Has_No_Elaboration_Code (Cunit (Unit)) then if not Has_No_Elaboration_Code (Cunit (Unit)) then
Main_Restrictions.Violated (No_Elaboration_Code) := True; Main_Restrictions.Violated (No_Elaboration_Code) := True;
Main_Restrictions.Count (No_Elaboration_Code) := -1;
end if; end if;
end if; end if;
end loop; end loop;
......
...@@ -406,11 +406,13 @@ package Lib.Writ is ...@@ -406,11 +406,13 @@ package Lib.Writ is
-- One of these lines is present for each unit that is mentioned in -- One of these lines is present for each unit that is mentioned in
-- an explicit with clause by the current unit. The first parameter -- an explicit with clause by the current unit. The first parameter
-- is the unit name in internal format. The second parameter is the -- is the unit name in internal format. The second parameter is the
-- file name of the file that must be compiled to compile this unit -- file name of the file that must be compiled to compile this unit.
-- (which is usually the file for the body, except for packages -- It is usually the file for the body, except for packages
-- which have no body). The third parameter is the file name of the -- which have no body; for units that need a body, if the source file
-- library information file that contains the results of compiling -- for the body cannot be found, the file name of the spec is used
-- this unit. The optional modifiers are used as follows: -- instead. The third parameter is the file name of the library
-- information file that contains the results of compiling this unit.
-- The optional modifiers are used as follows:
-- --
-- E pragma Elaborate applies to this unit -- E pragma Elaborate applies to this unit
-- --
......
...@@ -372,7 +372,7 @@ package body Restrict is ...@@ -372,7 +372,7 @@ package body Restrict is
and then Restrictions.Set (No_Protected_Type_Allocators) and then Restrictions.Set (No_Protected_Type_Allocators)
and then Restrictions.Set (No_Local_Protected_Objects) and then Restrictions.Set (No_Local_Protected_Objects)
and then Restrictions.Set (No_Requeue_Statements) and then Restrictions.Set (No_Requeue_Statements)
and then Restrictions.Set (No_Task_Attributes) and then Restrictions.Set (No_Task_Attributes_Package)
and then Restrictions.Set (Max_Asynchronous_Select_Nesting) and then Restrictions.Set (Max_Asynchronous_Select_Nesting)
and then Restrictions.Set (Max_Task_Entries) and then Restrictions.Set (Max_Task_Entries)
and then Restrictions.Set (Max_Protected_Entries) and then Restrictions.Set (Max_Protected_Entries)
...@@ -472,7 +472,7 @@ package body Restrict is ...@@ -472,7 +472,7 @@ package body Restrict is
Set_Restriction (No_Protected_Type_Allocators, N); Set_Restriction (No_Protected_Type_Allocators, N);
Set_Restriction (No_Local_Protected_Objects, N); Set_Restriction (No_Local_Protected_Objects, N);
Set_Restriction (No_Requeue_Statements, N); Set_Restriction (No_Requeue_Statements, N);
Set_Restriction (No_Task_Attributes, N); Set_Restriction (No_Task_Attributes_Package, N);
-- Set parameter restrictions -- Set parameter restrictions
......
...@@ -77,27 +77,27 @@ package Restrict is ...@@ -77,27 +77,27 @@ package Restrict is
end record; end record;
Unit_Array : constant array (Positive range <>) of Unit_Entry := ( Unit_Array : constant array (Positive range <>) of Unit_Entry := (
(No_Asynchronous_Control, "a-astaco"), (No_Asynchronous_Control, "a-astaco"),
(No_Calendar, "a-calend"), (No_Calendar, "a-calend"),
(No_Calendar, "calendar"), (No_Calendar, "calendar"),
(No_Delay, "a-calend"), (No_Delay, "a-calend"),
(No_Delay, "calendar"), (No_Delay, "calendar"),
(No_Dynamic_Priorities, "a-dynpri"), (No_Dynamic_Priorities, "a-dynpri"),
(No_Finalization, "a-finali"), (No_Finalization, "a-finali"),
(No_IO, "a-direio"), (No_IO, "a-direio"),
(No_IO, "directio"), (No_IO, "directio"),
(No_IO, "a-sequio"), (No_IO, "a-sequio"),
(No_IO, "sequenio"), (No_IO, "sequenio"),
(No_IO, "a-ststio"), (No_IO, "a-ststio"),
(No_IO, "a-textio"), (No_IO, "a-textio"),
(No_IO, "text_io "), (No_IO, "text_io "),
(No_IO, "a-witeio"), (No_IO, "a-witeio"),
(No_Task_Attributes, "a-tasatt"), (No_Task_Attributes_Package, "a-tasatt"),
(No_Streams, "a-stream"), (No_Streams, "a-stream"),
(No_Unchecked_Conversion, "a-unccon"), (No_Unchecked_Conversion, "a-unccon"),
(No_Unchecked_Conversion, "unchconv"), (No_Unchecked_Conversion, "unchconv"),
(No_Unchecked_Deallocation, "a-uncdea"), (No_Unchecked_Deallocation, "a-uncdea"),
(No_Unchecked_Deallocation, "unchdeal")); (No_Unchecked_Deallocation, "unchdeal"));
-- The following map has True for all GNAT pragmas. It is used to -- The following map has True for all GNAT pragmas. It is used to
-- implement pragma Restrictions (No_Implementation_Restrictions) -- implement pragma Restrictions (No_Implementation_Restrictions)
...@@ -123,7 +123,7 @@ package Restrict is ...@@ -123,7 +123,7 @@ package Restrict is
No_Select_Statements => True, No_Select_Statements => True,
No_Standard_Storage_Pools => True, No_Standard_Storage_Pools => True,
No_Streams => True, No_Streams => True,
No_Task_Attributes => True, No_Task_Attributes_Package => True,
No_Task_Termination => True, No_Task_Termination => True,
No_Wide_Characters => True, No_Wide_Characters => True,
Static_Priorities => True, Static_Priorities => True,
......
...@@ -40,9 +40,9 @@ package body System.Restrictions is ...@@ -40,9 +40,9 @@ package body System.Restrictions is
function Abort_Allowed return Boolean is function Abort_Allowed return Boolean is
begin begin
return Restrictions.Violated (No_Abort_Statements) return Run_Time_Restrictions.Violated (No_Abort_Statements)
or else or else
Restrictions.Violated (Max_Asynchronous_Select_Nesting); Run_Time_Restrictions.Violated (Max_Asynchronous_Select_Nesting);
end Abort_Allowed; end Abort_Allowed;
--------------------- ---------------------
...@@ -51,12 +51,98 @@ package body System.Restrictions is ...@@ -51,12 +51,98 @@ package body System.Restrictions is
function Tasking_Allowed return Boolean is function Tasking_Allowed return Boolean is
begin begin
return Restrictions.Violated (Max_Tasks) return Run_Time_Restrictions.Violated (Max_Tasks)
or else or else
Restrictions.Violated (No_Tasking); Run_Time_Restrictions.Violated (No_Tasking);
end Tasking_Allowed; end Tasking_Allowed;
-- Package elaboration code (acquire restrictions)
begin begin
null; Acquire_Restrictions : declare
subtype Big_String is String (Positive);
type Big_String_Ptr is access all Big_String;
RString : Big_String_Ptr;
pragma Import (C, RString, "__gl_restrictions");
P : Natural := 1;
-- Pointer to scan string
C : Character;
-- Next character from string
function Get_Char return Character;
-- Get next character from string
function Get_Natural return Natural;
-- Scan out natural value known to be in range, updating P past it
--------------
-- Get_Char --
--------------
function Get_Char return Character is
begin
P := P + 1;
return RString (P - 1);
end Get_Char;
-----------------
-- Get_Natural --
-----------------
function Get_Natural return Natural is
N : Natural := 0;
begin
while RString (P) in '0' .. '9' loop
N := N * 10 + (Character'Pos (Get_Char) - Character'Pos ('0'));
end loop;
return N;
end Get_Natural;
-- Start of processing for Acquire_Restrictions
begin
-- Acquire data corresponding to first R line
for R in All_Boolean_Restrictions loop
C := Get_Char;
if C = 'v' then
Run_Time_Restrictions.Violated (R) := True;
elsif C = 'r' then
Run_Time_Restrictions.Set (R) := True;
end if;
end loop;
-- Acquire data corresponding to second R line
for RP in All_Parameter_Restrictions loop
-- Acquire restrictions pragma information
if Get_Char = 'r' then
Run_Time_Restrictions.Set (RP) := True;
Run_Time_Restrictions.Value (RP) := Get_Natural;
end if;
-- Acquire restrictions violations information
if Get_Char = 'v' then
Run_Time_Restrictions.Violated (RP) := True;
Run_Time_Restrictions.Count (RP) := Get_Natural;
if RString (P) = '+' then
Run_Time_Restrictions.Unknown (RP) := True;
P := P + 1;
end if;
end if;
end loop;
end Acquire_Restrictions;
end System.Restrictions; end System.Restrictions;
...@@ -39,7 +39,7 @@ package System.Restrictions is ...@@ -39,7 +39,7 @@ package System.Restrictions is
pragma Discard_Names; pragma Discard_Names;
package Rident is new System.Rident; package Rident is new System.Rident;
Restrictions : Rident.Restrictions_Info; Run_Time_Restrictions : Rident.Restrictions_Info;
------------------ ------------------
-- Subprograms -- -- Subprograms --
......
...@@ -97,7 +97,7 @@ package System.Rident is ...@@ -97,7 +97,7 @@ package System.Rident is
No_Standard_Storage_Pools, -- GNAT No_Standard_Storage_Pools, -- GNAT
No_Streams, -- GNAT No_Streams, -- GNAT
No_Task_Allocators, -- (RM D.7(7)) No_Task_Allocators, -- (RM D.7(7))
No_Task_Attributes, -- GNAT No_Task_Attributes_Package, -- GNAT
No_Task_Hierarchy, -- (RM D.7(3), H.4(3)) No_Task_Hierarchy, -- (RM D.7(3), H.4(3))
No_Task_Termination, -- GNAT (Ravenscar) No_Task_Termination, -- GNAT (Ravenscar)
No_Tasking, -- GNAT No_Tasking, -- GNAT
...@@ -154,8 +154,9 @@ package System.Rident is ...@@ -154,8 +154,9 @@ package System.Rident is
-- Synonyms permitted for historical purposes of compatibility -- Synonyms permitted for historical purposes of compatibility
-- No_Requeue synonym for No_Requeue_Statements -- No_Requeue synonym for No_Requeue_Statements
-- No_Tasking synonym for Max_Tasks => 0 -- No_Tasking synonym for Max_Tasks => 0
-- No_Task_Attributes synonym for No_Task_Attributes_Package
subtype All_Restrictions is Restriction_Id range subtype All_Restrictions is Restriction_Id range
Boolean_Entry_Barriers .. Max_Storage_At_Blocking; Boolean_Entry_Barriers .. Max_Storage_At_Blocking;
......
...@@ -3280,6 +3280,15 @@ package body Sem_Prag is ...@@ -3280,6 +3280,15 @@ package body Sem_Prag is
Set_Restriction (No_Requeue_Statements, N); Set_Restriction (No_Requeue_Statements, N);
Set_Warning (No_Requeue_Statements); Set_Warning (No_Requeue_Statements);
-- No_Task_Attributes is a synonym for
-- No_Task_Attributes_Package
elsif Chars (Expr) = Name_No_Task_Attributes then
Check_Restriction
(No_Implementation_Restrictions, Arg);
Set_Restriction (No_Task_Attributes_Package, N);
Set_Warning (No_Task_Attributes_Package);
-- Normal processing for all other cases -- Normal processing for all other cases
else else
...@@ -9648,7 +9657,8 @@ package body Sem_Prag is ...@@ -9648,7 +9657,8 @@ package body Sem_Prag is
-- the formal may be wrapped in a conversion if the actual -- the formal may be wrapped in a conversion if the actual
-- is a conversion. Retrieve the real entity name. -- is a conversion. Retrieve the real entity name.
if In_Instance_Body if (In_Instance_Body
or else In_Inlined_Body)
and then Nkind (E_Id) = N_Unchecked_Type_Conversion and then Nkind (E_Id) = N_Unchecked_Type_Conversion
then then
E_Id := Expression (E_Id); E_Id := Expression (E_Id);
......
...@@ -335,6 +335,7 @@ package body Snames is ...@@ -335,6 +335,7 @@ package body Snames is
"parameter_types#" & "parameter_types#" &
"reference#" & "reference#" &
"no_requeue#" & "no_requeue#" &
"no_task_attributes#" &
"restricted#" & "restricted#" &
"result_mechanism#" & "result_mechanism#" &
"result_type#" & "result_type#" &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment