* Pragma Profile::
* Pragma Profile_Warnings::
* Pragma Propagate_Exceptions::
+* Pragma Provide_Shift_Operators::
* Pragma Psect_Object::
* Pragma Pure_05::
* Pragma Pure_12::
* Pragma Profile::
* Pragma Profile_Warnings::
* Pragma Propagate_Exceptions::
+* Pragma Provide_Shift_Operators::
* Pragma Psect_Object::
* Pragma Pure_05::
* Pragma Pure_12::
purposes. It used to be used in connection with optimization of
a now-obsolete mechanism for implementation of exceptions.
+@node Pragma Provide_Shift_Operators
+@unnumberedsec Pragma Provide_Shift_Operators
+@cindex Shift operators
+@findex Provide_Shift_Operators
+@noindent
+Syntax:
+
+@smallexample @c ada
+pragma Provide_Shift_Operators (integer_first_subtype_LOCAL_NAME);
+@end smallexample
+
+@noindent
+This pragma can be applied to a first subtype local name that specifies
+either an unsigned or signed type. It has the effect of providing the
+five shift operators (Shift_Left, Shift_Right, Shift_Right_Arithmetic,
+Rotate_Left and Rotate_Right) for the given type. It is equivalent to
+including the function declarations for these five operators, together
+with the pragma Import (Intrinsic, ...) statements.
+
@node Pragma Psect_Object
@unnumberedsec Pragma Psect_Object
@findex Psect_Object
@smallexample @c ada
function Shift_Left
(Value : T;
- Amount : Natural)
- return T;
+ Amount : Natural) return T;
@end smallexample
@noindent
The shift amount must be Natural.
The formal parameter names can be anything.
+A more convenient way of providing these shift operators is to use
+the Provide_Shift_Operators pragma, which provides the function declarations
+and corresponding pragma Import's for all five shift functions.
+
@node Source_Location
@section Source_Location
@cindex Source_Location