diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-05-27 15:09:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-05-27 15:09:26 +0200 |
commit | 8a36a0ccd84d73e8bfb5989be1510536b73b9df9 (patch) | |
tree | 117c6dde30102543581aa4da898f72f25fea3aa8 /gcc/ada/sem_prag.adb | |
parent | 062583ea1ced97a69fd5df986dada75c33c940d8 (diff) | |
download | gcc-8a36a0ccd84d73e8bfb5989be1510536b73b9df9.tar.gz |
[multiple changes]
2004-05-27 Vincent Celier <celier@gnat.com>
* vms_data.ads: Add new GNAT PRETTY qualifiers /NO_BACKUP and
COMMENTS_LAYOUT=UNTOUCHED
* symbols-vms.adb, symbols-vms-alpha.adb: Renamed symbols-vms.adb to
symbols-vms-alpha.adb
2004-05-27 Thomas Quinot <quinot@act-europe.fr>
* sem.ads: Clarify documentation on checks suppression.
* einfo.ads (Is_Known_Non_Null): Minor comment typo fix and rephrasing.
2004-05-27 Ed Schonberg <schonberg@gnat.com>
* sem_util.adb (Is_Descendent_Of): Examine properly all ancestors in
the case of multiple derivations.
(Is_Object_Reference): For a selected component, verify that the prefix
is itself an object and not a value.
* sem_ch12.adb (Same_Instantiated_Constant): New name for
Same_Instantiated_Entity.
(Same_Instantiated_Variable): Subsidiary to
Check_Formal_Package_Instance, to recognize actuals for in-out generic
formals that are obtained from a previous formal package.
(Instantiate_Subprogram_Body): Emit proper error when
generating code and the proper body of a stub is missing.
* sem_ch4.adb (Remove_Address_Interpretations): If the operation still
has a universal interpretation, do the disambiguation here.
* exp_ch4.adb (Expand_N_Type_Conversion,
Expand_N_Unchecked_Type_Conversion): Special handling when target type
is Address, to avoid typing anomalies when Address is a visible integer
type.
* exp_ch6.adb (Expand_N_Subprogram_Body): Use Is_Descendent_Of_Address
to determine whether a subprogram should not be marked Pure, even when
declared in a pure package.
2004-05-27 Jose Ruiz <ruiz@act-europe.fr>
* gnat_ugn.texi: Replace pragma Ravenscar by pragma Profile.
* gnat_rm.texi: Replace Max_Entry_Queue_Depth by Max_Entry_Queue_Length
Document No_Dynamic_Attachment, that supersedes No_Dynamic_Interrupts.
Update the documentation about the Ravenscar profile, following the
definition found in AI-249.
* sem_prag.adb: Use FIFO_Within_Priorities and Ceiling_Locking when
setting the Profile (Ravenscar). This must be done in addition to
setting the required restrictions.
* rtsfind.ads: Add the set of operations defined in package
Ada.Interrupts.
* exp_ch6.adb: Check whether we are violating the No_Dynamic_Attachment
restriction.
2004-05-27 Eric Botcazou <ebotcazou@act-europe.fr>
lang-specs.h: Always require -c or -S and always redirect to /dev/null
if -gnatc or -gnats is passed.
2004-05-27 Hristian Kirtchev <kirtchev@gnat.com>
* sem_prag.adb (Sig_Flags): A Pragma_Unchecked_Union does not count as
a significant reference. Warnings are now properly emitted when a
discriminated type is not referenced.
* lib-xref.adb (Generate_Reference): A deferred constant completion,
record representation clause or record type discriminant does not
produce a reference to its corresponding entity. Warnings are now
properly emitted when deferred constants and record types are not
referenced.
2004-05-27 Geert Bosch <bosch@gnat.com>
* Makefile.in: Use long version of libm routines on ia64 gnu/linux.
Fixes ACATS Annex G tests.
2004-05-27 Robert Dewar <dewar@gnat.com>
* rtsfind.adb (RTU_Loaded): Temporary kludge to get past bug of not
handling WITH
2004-05-27 Arnaud Charlet <charlet@act-europe.fr>
* s-interr.adb (Server_Task): Take into account case of early return
from sigwait under e.g. linux.
2004-05-27 Sergey Rybin <rybin@act-europe.fr>
* gnat_ugn.texi: Add description for the new gnatpp options:
-rnb - replace the original source without creating its backup copy
-c0 - do not format comments
From-SVN: r82324
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 87 |
1 files changed, 79 insertions, 8 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index d3ee90e982f..a48a6ca0479 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -561,6 +561,12 @@ package body Sem_Prag is -- argument has the right form then the Mechanism field of Ent is -- set appropriately. + procedure Set_Ravenscar_Profile (N : Node_Id); + -- Activate the set of configuration pragmas and restrictions that + -- make up the Ravenscar Profile. N is the corresponding pragma + -- node, which is used for error messages on any constructs + -- that violate the profile. + -------------------------- -- Check_Ada_83_Warning -- -------------------------- @@ -3257,8 +3263,7 @@ package body Sem_Prag is Val : Uint; procedure Set_Warning (R : All_Restrictions); - -- If this is a Restriction_Warnings pragma, set warning flag, - -- otherwise flag gets cleared. + -- If this is a Restriction_Warnings pragma, set warning flag ----------------- -- Set_Warning -- @@ -3266,8 +3271,9 @@ package body Sem_Prag is procedure Set_Warning (R : All_Restrictions) is begin - Restriction_Warnings (R) := - Prag_Id = Pragma_Restriction_Warnings; + if Prag_Id = Pragma_Restriction_Warnings then + Restriction_Warnings (R) := True; + end if; end Set_Warning; -- Start of processing for Process_Restrictions_Or_Restriction_Warnings @@ -3821,6 +3827,70 @@ package body Sem_Prag is end Set_Mechanism_Value; + --------------------------- + -- Set_Ravenscar_Profile -- + --------------------------- + + -- The tasks to be done here are + + -- Set required policies + + -- pragma Task_Dispatching_Policy (FIFO_Within_Priorities) + -- pragma Locking_Policy (Ceiling_Locking) + + -- Set Detect_Blocking mode ??? + + -- Set required restrictions (see Restrict.Set_Ravenscar for details) + + procedure Set_Ravenscar_Profile (N : Node_Id) is + begin + -- pragma Task_Dispatching_Policy (FIFO_Within_Priorities) + + if Task_Dispatching_Policy /= ' ' + and then Task_Dispatching_Policy /= 'F' + then + Error_Msg_Sloc := Task_Dispatching_Policy_Sloc; + Error_Pragma ("Profile (Ravenscar) incompatible with policy#"); + + -- Set the FIFO_Within_Priorities policy, but always + -- preserve System_Location since we like the error + -- message with the run time name. + + else + Task_Dispatching_Policy := 'F'; + + if Task_Dispatching_Policy_Sloc /= System_Location then + Task_Dispatching_Policy_Sloc := Loc; + end if; + end if; + + -- pragma Locking_Policy (Ceiling_Locking) + + if Locking_Policy /= ' ' + and then Locking_Policy /= 'C' + then + Error_Msg_Sloc := Locking_Policy_Sloc; + Error_Pragma ("Profile (Ravenscar) incompatible with policy#"); + + -- Set the Ceiling_Locking policy, but always preserve + -- System_Location since we like the error message with the + -- run time name. + + else + Locking_Policy := 'C'; + + if Locking_Policy_Sloc /= System_Location then + Locking_Policy_Sloc := Loc; + end if; + end if; + + -- ??? Detect_Blocking + + -- Set the corresponding restrictions + + Set_Ravenscar (N); + end Set_Ravenscar_Profile; + -- Start of processing for Analyze_Pragma begin @@ -8005,13 +8075,12 @@ package body Sem_Prag is Check_Arg_Count (1); Check_Valid_Configuration_Pragma; Check_No_Identifiers; - Set_Ravenscar (N); declare Argx : constant Node_Id := Get_Pragma_Arg (Arg1); begin if Chars (Argx) = Name_Ravenscar then - Set_Ravenscar (N); + Set_Ravenscar_Profile (N); else Error_Pragma_Arg ("& is not a valid profile", Argx); end if; @@ -8481,7 +8550,7 @@ package body Sem_Prag is GNAT_Pragma; Check_Arg_Count (0); Check_Valid_Configuration_Pragma; - Set_Ravenscar (N); + Set_Ravenscar_Profile (N); ------------------------- -- Restricted_Run_Time -- @@ -9950,6 +10019,7 @@ package body Sem_Prag is -- Start of prorcessing for Is_Config_Static_String begin + Name_Len := 0; return Add_Config_Static_String (Arg); end Is_Config_Static_String; @@ -9965,6 +10035,7 @@ package body Sem_Prag is -- indicates that appearence in that parameter position is significant. Sig_Flags : constant array (Pragma_Id) of Int := + (Pragma_AST_Entry => -1, Pragma_Abort_Defer => -1, Pragma_Ada_83 => -1, @@ -10095,7 +10166,7 @@ package body Sem_Prag is Pragma_Thread_Body => +2, Pragma_Time_Slice => -1, Pragma_Title => -1, - Pragma_Unchecked_Union => -1, + Pragma_Unchecked_Union => 0, Pragma_Unimplemented_Unit => -1, Pragma_Universal_Data => -1, Pragma_Unreferenced => -1, |