diff options
Diffstat (limited to 'gcc/ada/gnat_rm.texi')
-rw-r--r-- | gcc/ada/gnat_rm.texi | 157 |
1 files changed, 115 insertions, 42 deletions
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index ea278f14cf9..d3d28367e88 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -16,7 +16,11 @@ @c oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo @setfilename gnat_rm.info + +@set FSFEDITION + @settitle GNAT Reference Manual + @setchapternewpage odd @syncodeindex fn cp @@ -82,6 +86,7 @@ Ada Core Technologies, Inc. * Specialized Needs Annexes:: * Implementation of Specific Ada Features:: * Project File Reference:: +* Obsolescent Features:: * GNU Free Documentation License:: * Index:: @@ -152,10 +157,10 @@ Implementation Defined Pragmas * Pragma Passive:: * Pragma Polling:: * Pragma Profile (Ravenscar):: +* Pragma Profile (Restricted):: * Pragma Propagate_Exceptions:: * Pragma Psect_Object:: * Pragma Pure_Function:: -* Pragma Restricted_Run_Time:: * Pragma Restriction_Warnings:: * Pragma Source_File_Name:: * Pragma Source_File_Name_Project:: @@ -378,6 +383,8 @@ Implementation of Specific Ada Features Project File Reference +Obsolescent Features + GNU Free Documentation License Index @@ -388,11 +395,21 @@ Index @node About This Guide @unnumbered About This Guide +@ifclear PROEDITION @noindent This manual contains useful information in writing programs using the GNAT compiler. It includes information on implementation dependent characteristics of GNAT, including all the information required by Annex M of the standard. +@end ifclear + +@ifset PROEDITION +@noindent +This manual contains useful information in writing programs using the +GNAT Pro compiler. It includes information on implementation dependent +characteristics of GNAT Pro, including all the information required by Annex +M of the standard. +@end ifset Ada 95 is designed to be highly portable. In general, a program will have the same effect even when compiled by @@ -408,6 +425,11 @@ may be non-portable. You should follow good programming practice and isolate and clearly document any sections of your program that make use of these features in a non-portable manner. +@ifset PROEDITION +For ease of exposition, ``GNAT Pro'' will be referred to simply as +``GNAT'' in the remainder of this document. +@end ifset + @menu * What This Reference Manual Contains:: * Conventions:: @@ -481,6 +503,12 @@ other features. @ref{Project File Reference}, presents the syntax and semantics of project files. +@item +@ref{Obsolescent Features} documents implementation dependent features, +including pragmas and attributes, which are considered obsolescent, since +there are other preferred ways of achieving the same results. These +obsolescent forms are retained for backwards compatibilty. + @end itemize @cindex Ada 95 ISO/ANSI Standard @@ -643,10 +671,10 @@ consideration, the use of these pragmas should be minimized. * Pragma Passive:: * Pragma Polling:: * Pragma Profile (Ravenscar):: +* Pragma Profile (Restricted):: * Pragma Propagate_Exceptions:: * Pragma Psect_Object:: * Pragma Pure_Function:: -* Pragma Restricted_Run_Time:: * Pragma Restriction_Warnings:: * Pragma Source_File_Name:: * Pragma Source_File_Name_Project:: @@ -2945,14 +2973,51 @@ AI-305) available at respectively. The above set is a superset of the restrictions provided by pragma -@code{Restricted_Run_Time}, it includes six additional restrictions +@code{Profile (Restricted)}, it includes six additional restrictions (@code{Simple_Barriers}, @code{No_Select_Statements}, @code{No_Calendar}, @code{No_Implicit_Heap_Allocations}, @code{No_Relative_Delay} and @code{No_Task_Termination}). This means that pragma @code{Profile (Ravenscar)}, like the pragma -@code{Restricted_Run_Time}, automatically causes the use of a simplified, +@code{Profile (Restricted)}, +automatically causes the use of a simplified, more efficient version of the tasking run-time system. +@node Pragma Profile (Restricted) +@unnumberedsec Pragma Profile (Restricted) +@findex Restricted Run Time +@noindent +Syntax: + +@smallexample @c ada +pragma Profile (Restricted); +@end smallexample + +@noindent +A configuration pragma that establishes the following set of restrictions: + +@itemize @bullet +@item No_Abort_Statements +@item No_Entry_Queue +@item No_Task_Hierarchy +@item No_Task_Allocators +@item No_Dynamic_Priorities +@item No_Terminate_Alternatives +@item No_Dynamic_Attachment +@item No_Protected_Type_Allocators +@item No_Local_Protected_Objects +@item No_Requeue_Statements +@item No_Task_Attributes_Package +@item Max_Asynchronous_Select_Nesting = 0 +@item Max_Task_Entries = 0 +@item Max_Protected_Entries = 1 +@item Max_Select_Alternatives = 0 +@end itemize + +@noindent +This set of restrictions causes the automatic selection of a simplified +version of the run time that provides improved performance for the +limited set of tasking functionality permitted by this set of restrictions. + @node Pragma Propagate_Exceptions @unnumberedsec Pragma Propagate_Exceptions @findex Propagate_Exceptions @@ -3063,42 +3128,6 @@ applies to the underlying renamed function. This can be used to disambiguate cases of overloading where some but not all functions in a set of overloaded functions are to be designated as pure. -@node Pragma Restricted_Run_Time -@unnumberedsec Pragma Restricted_Run_Time -@findex Restricted_Run_Time -@noindent -Syntax: - -@smallexample @c ada -pragma Restricted_Run_Time; -@end smallexample - -@noindent -A configuration pragma that establishes the following set of restrictions: - -@itemize @bullet -@item No_Abort_Statements -@item No_Entry_Queue -@item No_Task_Hierarchy -@item No_Task_Allocators -@item No_Dynamic_Priorities -@item No_Terminate_Alternatives -@item No_Dynamic_Attachment -@item No_Protected_Type_Allocators -@item No_Local_Protected_Objects -@item No_Requeue_Statements -@item No_Task_Attributes_Package -@item Max_Asynchronous_Select_Nesting = 0 -@item Max_Task_Entries = 0 -@item Max_Protected_Entries = 1 -@item Max_Select_Alternatives = 0 -@end itemize - -@noindent -This set of restrictions causes the automatic selection of a simplified -version of the run time that provides improved performance for the -limited set of tasking functionality permitted by this set of restrictions. - @node Pragma Restriction_Warnings @unnumberedsec Pragma Restriction_Warnings @findex Restriction_Warnings @@ -6031,7 +6060,7 @@ restrictions to produce a more efficient implementation. GNAT currently takes advantage of these restrictions by providing an optimized run time when the Ravenscar profile and the GNAT restricted run time set of restrictions are specified. See pragma @code{Profile (Ravenscar)} and -pragma @code{Restricted_Run_Time} for more details. +pragma @code{Profile (Restricted)} for more details. @cindex Time, monotonic @unnumberedsec D.8(47-49): Monotonic Time @@ -6975,7 +7004,10 @@ of exceptions when they are declared. This restriction ensures that the generated code does not contain any implicit conditionals, either by modifying the generated code where possible, or by rejecting any construct that would otherwise generate an implicit -conditional. +conditional. Note that this check does not include run time constraint +checks, which on some targets may generate implicit conditionals as +well. To control the latter, constraint checks can be suppressed in the +normal manner. @item No_Implicit_Dynamic_Code @findex No_Implicit_Dynamic_Code @@ -14196,6 +14228,47 @@ sequential elaboration of all its declarations. The computed values of attributes and variables in the project are then used to establish the environment in which the gnat tool will execute. +@node Obsolescent Features +@chapter Obsolescent Features + +@noindent +This chapter describes features that are provided by GNAT, but are +considered obsolescent since there are preferred ways of achieving +the same effect. These features are provided solely for historical +compatibility purposes. + +@menu +* pragma No_Run_Time:: +* pragma Ravenscar:: +* pragma Restricted_Run_Time:: +@end menu + +@node pragma No_Run_Time +@section pragma No_Run_Time + +The pragma @code{No_Run_Time} is used to achieve an affect similar +to the use of the "Zero Foot Print" configurable run time, but without +requiring a specially configured run time. The result of using this +pragma, which must be used for all units in a partition, is to restrict +the use of any language features requiring run-time support code. The +preferred usage is to use an appropriately configured run-time that +includes just those features that are to be made accessible. + +@node pragma Ravenscar +@section pragma Ravenscar + +The pragma @code{Ravenscar} has exactly the same effect as pragma +@code{Profile (Ravenscar)}. The latter usage is preferred since it +is part of the new Ada 2005 standard. + +@node pragma Restricted_Run_Time +@section pragma Restricted_Run_Time + +The pragma @code{Restricted_Run_Time} has exactly the same effect as +pragma @code{Profile (Restricted)}. The latter usage is +preferred since the Ada 2005 pragma @code{Profile} is intended for +this kind of implementation dependent addition. + @include fdl.texi @c GNU Free Documentation License |