summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 12:32:01 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 12:32:01 +0000
commit1e16c51c81c146ee5f1cd929c4bdbbe00e70d8c5 (patch)
tree30150d4eda55a02c6bc00f9262c17b795a63423d /gcc/ada/exp_ch9.adb
parent4e090328b4feb4b0227807217cca120441fab2d0 (diff)
downloadgcc-1e16c51c81c146ee5f1cd929c4bdbbe00e70d8c5.tar.gz
2004-02-02 Vincent Celier <celier@gnat.com>
* gprcmd.adb (Check_Args): If condition is false, print the invoked comment before the usage. Gprcmd: Fail when command is not recognized. (Usage): Document command "prefix" * g-md5.adb (Digest): Process last block. (Update): Do not process last block. Store remaining characters and length in Context. * g-md5.ads (Update): Document that several call to update are equivalent to one call with the concatenated string. (Context): Add fields to allow new Update behaviour. * fname-uf.ads/adb (Get_File_Name): New Boolean parameter May_Fail, defaulted to False. When May_Fail is True and no existing file can be found, return No_File. * 6vcstrea.adb: Inlined functions are now wrappers to implementation functions. * lib-writ.adb (Write_With_Lines): When body file does not exist, use spec file name instead on the W line. 2004-02-02 Robert Dewar <dewar@gnat.com> * ali.adb: Read and acquire info from new format restrictions lines * bcheck.adb: Add circuits for checking restrictions with parameters * bindgen.adb: Output dummy restrictions data To be changed later * ali.ads, checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_util.adb, freeze.adb, gnat1drv.adb, sem_attr.adb, sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, targparm.adb, targparm.ads, tbuild.adb, sem_ch2.adb, sem_elab.adb, sem_res.adb: Minor changes for new restrictions handling. * exp_ch9.adb (Build_Master_Entity): Cleanup the code (also suppresses the warning message on access to possibly uninitialized variable S) Minor changes for new restrictions handling. * gnatbind.adb: Minor reformatting Minor changes for new restrictions handling Move circuit for -r processing here from bcheck (cleaner) * gnatcmd.adb, gnatlink.adb: Minor reformatting * lib-writ.adb: Output new format restrictions lines * lib-writ.ads: Document new R format lines for new restrictions handling. * s-restri.ads/adb: New files * Makefile.rtl: Add entry for s-restri.ads/adb * par-ch3.adb: Fix bad error messages starting with upper case letter Minor reformatting * restrict.adb: Major rewrite throughout for new restrictions handling Major point is to handle restrictions with parameters * restrict.ads: Major changes in interface to handle restrictions with parameters. Also generally simplifies setting of restrictions. * snames.ads/adb: New entry for proper handling of No_Requeue * sem_ch3.adb (Count_Tasks): New circuitry for implementing Max_Tasks restriction counting. Other minor changes for new restrictions handling * sem_prag.adb: No_Requeue is a synonym for No_Requeue_Statements. Restriction_Warnings now allows full parameter notation Major rewrite of Restrictions for new restrictions handling 2004-02-02 Javier Miranda <miranda@gnat.com> * par-ch3.adb (P_Identifier_Declarations): Give support to the Ada 0Y syntax rule for object renaming declarations. (P_Array_Type_Definition): Give support for the Ada 0Y syntax rule for component definitions. * sem_ch3.adb (Analyze_Component_Declaration): Give support to access components. (Array_Type_Declaration): Give support to access components. In addition it was also modified to reflect the name of the object in anonymous array types. The old code did not take into account that it is possible to have an unconstrained anonymous array with an initial value. (Check_Or_Process_Discriminants): Allow access discriminant in non-limited types. (Process_Discriminants): Allow access discriminant in non-limited types Initialize the new Access_Definition field in N_Object_Renaming_Decl node. Change Ada0Y to Ada 0Y in comments * sem_ch4.adb (Find_Equality_Types): Allow anonymous access types in equality operators. Change Ada0Y to Ada 0Y in comments * sem_ch8.adb (Analyze_Object_Renaming): Give support to access renamings Change Ada0Y to Ada 0Y in comments * sem_type.adb (Find_Unique_Type): Give support to the equality operators for universal access types Change Ada0Y to Ada 0Y in comments * sinfo.adb (Access_Definition, Set_Access_Definition): New subprograms * sinfo.ads (N_Component_Definition): Addition of Access_Definition field. (N_Object_Renaming_Declaration): Addition of Access_Definition field Change Ada0Y to Ada 0Y in comments * sprint.adb (Sprint_Node_Actual): Give support to the new syntax for component definition and object renaming nodes Change Ada0Y to Ada 0Y in comments 2004-02-02 Jose Ruiz <ruiz@act-europe.fr> * restrict.adb: Use the new restriction identifier No_Requeue_Statements instead of the old No_Requeue for defining the restricted profile. * sem_ch9.adb (Analyze_Requeue): Check the new restriction No_Requeue_Statements. * s-rident.ads: Adding restriction No_Requeue_Statements (AI-00249) that supersedes the GNAT specific restriction No_Requeue. The later is kept for backward compatibility. 2004-02-02 Ed Schonberg <schonberg@gnat.com> * lib.ads, i-cobol.ads, * s-stoele.ads, s-thread.ads, style.ads, 5staprop.adb, atree.adb, atree.ads, g-crc32.ads: Remove redundant pragma and fix incorrect ones. * sem_prag.adb For pragma Inline and pragma Pure_Function, emit a warning if the pragma is redundant. 2004-02-02 Thomas Quinot <quinot@act-europe.fr> * 5staprop.adb: Add missing 'constant' keywords. * Makefile.in: use consistent value for SYMLIB on platforms where libaddr2line is supported. 2004-02-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * utils.c (end_subprog_body): Do not call rest_of_compilation if just annotating types. 2004-02-02 Olivier Hainque <hainque@act-europe.fr> * init.c (__gnat_install_handler): Setup an alternate stack for signal handlers in the environment thread. This allows proper propagation of an exception on stack overflows in this thread even when the builtin ABI stack-checking scheme is used without support for a stack reserve region. * utils.c (create_field_decl): Augment the head comment about bitfield creation, and don't account for DECL_BIT_FIELD in DECL_NONADDRESSABLE_P here, because the former is not accurate enough at this point. Let finish_record_type decide instead. Don't make a bitfield if the field is to be addressable. Always set a size for the field if the record is packed, to ensure the checks for bitfield creation are triggered. (finish_record_type): During last pass over the fields, clear DECL_BIT_FIELD when possible in the !STRICT_ALIGNMENT case, as this is not covered by the calls to layout_decl. Adjust DECL_NONADDRESSABLE_P from DECL_BIT_FIELD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r--gcc/ada/exp_ch9.adb72
1 files changed, 30 insertions, 42 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 76afc7b1495..8e2f2a3e1f7 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -43,6 +43,7 @@ with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Restrict; use Restrict;
+with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Ch6;
@@ -557,7 +558,7 @@ package body Exp_Ch9 is
elsif Has_Entries (Typ) then
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Typ) > 1
then
Protection_Type := RE_Protection_Entries;
@@ -1201,35 +1202,24 @@ package body Exp_Ch9 is
S : Entity_Id;
begin
- -- Ada0Y (AI-287): Do not set/get the has_master_entity reminder in
- -- internal scopes. Required for nested limited aggregates.
-
- if not Extensions_Allowed then
-
- -- Nothing to do if we already built a master entity for this scope
- -- or if there is no task hierarchy.
-
- if Has_Master_Entity (Scope (E))
- or else Restrictions (No_Task_Hierarchy)
- then
- return;
- end if;
+ S := Scope (E);
- else
- -- Ada0Y (AI-287): Similar to the previous case but skipping
- -- internal scopes. If we are not inside an internal scope this
- -- code is equivalent to the previous code.
+ -- Ada 0Y (AI-287): Do not set/get the has_master_entity reminder in
+ -- internal scopes. Required for nested limited aggregates.
- S := Scope (E);
+ if Extensions_Allowed then
while Is_Internal (S) loop
S := Scope (S);
end loop;
+ end if;
- if Has_Master_Entity (S)
- or else Restrictions (No_Task_Hierarchy)
- then
- return;
- end if;
+ -- Nothing to do if we already built a master entity for this scope
+ -- or if there is no task hierarchy.
+
+ if Has_Master_Entity (S)
+ or else Restriction_Active (No_Task_Hierarchy)
+ then
+ return;
end if;
-- Otherwise first build the master entity
@@ -1250,7 +1240,7 @@ package body Exp_Ch9 is
Insert_Before (P, Decl);
Analyze (Decl);
- -- Ada0Y (AI-287): Set the has_marter_entity reminder in the
+ -- Ada 0Y (AI-287): Set the has_master_entity reminder in the
-- non-internal scope selected above.
if not Extensions_Allowed then
@@ -1311,7 +1301,7 @@ package body Exp_Ch9 is
Add_Object_Pointer (Op_Decls, Pid, Loc);
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Pid) > 1
then
Complete := New_Reference_To (RTE (RE_Complete_Entry_Body), Loc);
@@ -1339,7 +1329,7 @@ package body Exp_Ch9 is
Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access))));
- if Restrictions (No_Exception_Handlers) then
+ if Restriction_Active (No_Exception_Handlers) then
return
Make_Subprogram_Body (Loc,
Specification => Espec,
@@ -1352,7 +1342,7 @@ package body Exp_Ch9 is
Set_All_Others (Ohandle);
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Pid) > 1
then
Complete :=
@@ -1746,7 +1736,7 @@ package body Exp_Ch9 is
or else (Has_Attach_Handler (Pid) and then not Restricted_Profile)
then
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Pid) > 1
then
Lock_Name := New_Reference_To (RTE (RE_Lock_Entries), Loc);
@@ -2070,7 +2060,7 @@ package body Exp_Ch9 is
-- parameters.
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else not Is_Protected_Type (Conctyp)
or else Number_Entries (Conctyp) > 1
then
@@ -2182,7 +2172,7 @@ package body Exp_Ch9 is
if Is_Protected_Type (Conctyp) then
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Conctyp) > 1
then
-- Change the type of the index declaration
@@ -2660,7 +2650,6 @@ package body Exp_Ch9 is
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
-
Subtype_Indication =>
Make_Subtype_Indication (Loc,
Subtype_Mark =>
@@ -2673,7 +2662,6 @@ package body Exp_Ch9 is
(Etype (Discrete_Subtype_Definition
(Parent (Efam))), Loc)))))));
-
end if;
Next_Entity (Efam);
@@ -2973,7 +2961,7 @@ package body Exp_Ch9 is
Call : Node_Id;
begin
- if Restrictions (No_Task_Hierarchy) = False then
+ if Restriction_Active (No_Task_Hierarchy) = False then
Call := Build_Runtime_Call (Sloc (N), RE_Enter_Master);
Prepend_To (Declarations (N), Call);
Analyze (Call);
@@ -4994,7 +4982,7 @@ package body Exp_Ch9 is
if Has_Entries
and then (Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Num_Entries > 1)
then
New_Op_Body := Build_Find_Body_Index (Pid);
@@ -5249,7 +5237,7 @@ package body Exp_Ch9 is
elsif Has_Entries (Prottyp) then
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Prottyp) > 1
then
Protection_Subtype :=
@@ -5572,7 +5560,7 @@ package body Exp_Ch9 is
New_External_Name (Chars (Prottyp), 'A'));
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else E_Count > 1
then
Body_Arr := Make_Object_Declaration (Loc,
@@ -5622,7 +5610,7 @@ package body Exp_Ch9 is
-- no entry queue, 1 entry)
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else E_Count > 1
then
Sub :=
@@ -7593,7 +7581,7 @@ package body Exp_Ch9 is
Append_To (Parms, New_Reference_To (B, Loc));
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Etype (Concval)) > 1
then
Rewrite (Call,
@@ -8195,7 +8183,7 @@ package body Exp_Ch9 is
Attribute_Name => Name_Unrestricted_Access));
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Ptyp) > 1
then
-- Find index mapping function (clumsy but ok for now).
@@ -8217,7 +8205,7 @@ package body Exp_Ch9 is
end if;
if Abort_Allowed
- or else Restrictions (No_Entry_Queue) = False
+ or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Ptyp) > 1
then
Append_To (L,
@@ -8439,7 +8427,7 @@ package body Exp_Ch9 is
-- See comments in System.Tasking.Initialization.Init_RTS for the
-- value 3.
- if Restrictions (No_Task_Hierarchy) = False then
+ if Restriction_Active (No_Task_Hierarchy) = False then
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
else
Append_To (Args, Make_Integer_Literal (Loc, 3));