Debian Codegraph @

gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst

raw
1 .. _Implementation_Defined_Characteristics:
2
3 **************************************
4 Implementation Defined Characteristics
5 **************************************
6
7 In addition to the implementation dependent pragmas and attributes, and the
8 implementation advice, there are a number of other Ada features that are
9 potentially implementation dependent and are designated as
10 implementation-defined. These are mentioned throughout the Ada Reference
11 Manual, and are summarized in Annex M.
12
13 A requirement for conforming Ada compilers is that they provide
14 documentation describing how the implementation deals with each of these
15 issues. In this chapter you will find each point in Annex M listed,
16 followed by a description of how GNAT handles the implementation dependence.
17
18 You can use this chapter as a guide to minimizing implementation
19 dependent features in your programs if portability to other compilers
20 and other operating systems is an important consideration. The numbers
21 in each entry below correspond to the paragraph numbers in the Ada
22 Reference Manual.
23
24 *
25 "Whether or not each recommendation given in Implementation
26 Advice is followed. See 1.1.2(37)."
27
28 See :ref:`Implementation_Advice`.
29
30 *
31 "Capacity limitations of the implementation. See 1.1.3(3)."
32
33 The complexity of programs that can be processed is limited only by the
34 total amount of available virtual memory, and disk space for the
35 generated object files.
36
37 *
38 "Variations from the standard that are impractical to avoid
39 given the implementation's execution environment. See 1.1.3(6)."
40
41 There are no variations from the standard.
42
43 *
44 "Which code_statements cause external
45 interactions. See 1.1.3(10)."
46
47 Any *code_statement* can potentially cause external interactions.
48
49 *
50 "The coded representation for the text of an Ada
51 program. See 2.1(4)."
52
53 See separate section on source representation.
54
55 *
56 "The semantics of an Ada program whose text is not in
57 Normalization Form C. See 2.1(4)."
58
59 See separate section on source representation.
60
61 *
62 "The representation for an end of line. See 2.2(2)."
63
64 See separate section on source representation.
65
66 *
67 "Maximum supported line length and lexical element
68 length. See 2.2(15)."
69
70 The maximum line length is 255 characters and the maximum length of
71 a lexical element is also 255 characters. This is the default setting
72 if not overridden by the use of compiler switch *-gnaty* (which
73 sets the maximum to 79) or *-gnatyMnn* which allows the maximum
74 line length to be specified to be any value up to 32767. The maximum
75 length of a lexical element is the same as the maximum line length.
76
77 *
78 "Implementation defined pragmas. See 2.8(14)."
79
80 See :ref:`Implementation_Defined_Pragmas`.
81
82 *
83 "Effect of pragma ``Optimize``. See 2.8(27)."
84
85 Pragma ``Optimize``, if given with a ``Time`` or ``Space``
86 parameter, checks that the optimization flag is set, and aborts if it is
87 not.
88
89 *
90 "The message string associated with the Assertion_Error exception raised
91 by the failure of a predicate check if there is no applicable
92 Predicate_Failure aspect. See 3.2.4(31)."
93
94 In the case of a Dynamic_Predicate aspect, the string is
95 "Dynamic_Predicate failed at <source position>", where
96 "<source position>" might be something like "foo.adb:123".
97 The Static_Predicate case is handled analogously.
98
99 *
100 "The predefined integer types declared in
101 ``Standard``. See 3.5.4(25)."
102
103 .. tabularcolumns:: |l|L|
104
105 ========================= =======================================
106 Type Representation
107 ========================= =======================================
108 *Short_Short_Integer* 8-bit signed
109 *Short_Integer* 16-bit signed
110 *Integer* 32-bit signed
111 *Long_Integer* 64-bit signed (on most 64-bit targets,
112 depending on the C definition of long)
113 32-bit signed (on all other targets)
114 *Long_Long_Integer* 64-bit signed
115 *Long_Long_Long_Integer* 128-bit signed (on 64-bit targets)
116 64-bit signed (on 32-bit targets)
117 ========================= =======================================
118
119 *
120 "Any nonstandard integer types and the operators defined
121 for them. See 3.5.4(26)."
122
123 There are no nonstandard integer types.
124
125 *
126 "Any nonstandard real types and the operators defined for
127 them. See 3.5.6(8)."
128
129 There are no nonstandard real types.
130
131 *
132 "What combinations of requested decimal precision and range
133 are supported for floating point types. See 3.5.7(7)."
134
135 The precision and range are defined by the IEEE Standard for Floating-Point
136 Arithmetic (IEEE 754-2019).
137
138 *
139 "The predefined floating point types declared in
140 ``Standard``. See 3.5.7(16)."
141
142 ====================== ===============================================
143 Type Representation
144 ====================== ===============================================
145 *Short_Float* IEEE Binary32 (Single)
146 *Float* IEEE Binary32 (Single)
147 *Long_Float* IEEE Binary64 (Double)
148 *Long_Long_Float* IEEE Binary64 (Double) on non-x86 architectures
149 IEEE 80-bit Extended on x86 architecture
150 ====================== ===============================================
151
152 The default rounding mode specified by the IEEE 754 Standard is assumed both
153 for static and dynamic computations (that is, round to nearest, ties to even).
154 The input routines yield correctly rounded values for Short_Float, Float, and
155 Long_Float at least. The output routines can compute up to twice as many exact
156 digits as the value of ``T'Digits`` for any type, for example 30 digits for
157 Long_Float; if more digits are requested, zeros are printed.
158
159 *
160 "The small of an ordinary fixed point type. See 3.5.9(8)."
161
162 The small is the largest power of two that does not exceed the delta.
163
164 *
165 "What combinations of small, range, and digits are
166 supported for fixed point types. See 3.5.9(10)."
167
168 For an ordinary fixed point type, on 32-bit platforms, the small must lie in
169 2.0**(-80) .. 2.0**80 and the range in -9.0E+36 .. 9.0E+36; any combination
170 is permitted that does not result in a mantissa larger than 63 bits.
171
172 On 64-bit platforms, the small must lie in 2.0**(-127) .. 2.0**127 and the
173 range in -1.0E+76 .. 1.0E+76; any combination is permitted that does not
174 result in a mantissa larger than 63 bits, and any combination is permitted
175 that results in a mantissa between 64 and 127 bits if the small is the
176 ratio of two integers that lie in 1 .. 2.0**127.
177
178 If the small is the ratio of two integers with 64-bit magnitude on 32-bit
179 platforms and 128-bit magnitude on 64-bit platforms, which is the case if
180 no ``small`` clause is provided, then the operations of the fixed point
181 type are entirely implemented by means of integer instructions. In the
182 other cases, some operations, in particular input and output, may be
183 implemented by means of floating-point instructions and may be affected
184 by accuracy issues on architectures other than x86.
185
186 For a decimal fixed point type, on 32-bit platforms, the small must lie in
187 1.0E-18 .. 1.0E+18 and the digits in 1 .. 18. On 64-bit platforms, the
188 small must lie in 1.0E-38 .. 1.0E+38 and the digits in 1 .. 38.
189
190 *
191 "The result of ``Tags.Expanded_Name`` for types declared
192 within an unnamed *block_statement*. See 3.9(10)."
193
194 Block numbers of the form :samp:`B{nnn}`, where *nnn* is a
195 decimal integer are allocated.
196
197 *
198 "The sequence of characters of the value returned by Tags.Expanded_Name
199 (respectively, Tags.Wide_Expanded_Name) when some of the graphic
200 characters of Tags.Wide_Wide_Expanded_Name are not defined in Character
201 (respectively, Wide_Character). See 3.9(10.1)."
202
203 This is handled in the same way as the implementation-defined behavior
204 referenced in A.4.12(34).
205
206 *
207 "Implementation-defined attributes. See 4.1.4(12)."
208
209 See :ref:`Implementation_Defined_Attributes`.
210
211 *
212 "The value of the parameter to Empty for some container aggregates.
213 See 4.3.5(40)."
214
215 As per the suggestion given in the Annotated Ada RM, the default value
216 of the formal parameter is used if one exists and zero is used otherwise.
217
218 *
219 "The maximum number of chunks for a parallel reduction expression without
220 a chunk_specification. See 4.5.10(21)."
221
222 Feature unimplemented.
223
224 *
225 "Rounding of real static expressions which are exactly half-way between
226 two machine numbers. See 4.9(38)."
227
228 Round to even is used in all such cases.
229
230 *
231 "The maximum number of chunks for a parallel generalized iterator without
232 a chunk_specification. See 5.5.2(10)."
233
234 Feature unimplemented.
235
236 *
237 "The number of chunks for an array component iterator. See 5.5.2(11)."
238
239 Feature unimplemented.
240
241 *
242 "Any extensions of the Global aspect. See 6.1.2(43)."
243
244 Feature unimplemented.
245
246 *
247 "The circumstances the implementation passes in the null value for a view
248 conversion of an access type used as an out parameter. See 6.4.1(19)."
249
250 Difficult to characterize.
251
252 *
253 "Any extensions of the Default_Initial_Condition aspect. See 7.3.3(11)."
254
255 SPARK allows specifying *null* as the Default_Initial_Condition
256 aspect of a type. See the SPARK reference manual for further details.
257
258 *
259 "Any implementation-defined time types. See 9.6(6)."
260
261 There are no implementation-defined time types.
262
263 *
264 "The time base associated with relative delays. See 9.6(20)."
265
266 See 9.6(20). The time base used is that provided by the C library
267 function ``gettimeofday``.
268
269 *
270 "The time base of the type ``Calendar.Time``. See 9.6(23)."
271
272 The time base used is that provided by the C library function
273 ``gettimeofday``.
274
275 *
276 "The time zone used for package ``Calendar``
277 operations. See 9.6(24)."
278
279 The time zone used by package ``Calendar`` is the current system time zone
280 setting for local time, as accessed by the C library function
281 ``localtime``.
282
283 *
284 "Any limit on *delay_until_statements* of
285 *select_statements*. See 9.6(29)."
286
287 There are no such limits.
288
289 *
290 "The result of Calendar.Formatting.Image if its argument represents more
291 than 100 hours. See 9.6.1(86)."
292
293 Calendar.Time_Error is raised.
294
295 *
296 "Implementation-defined conflict check policies. See 9.10.1(5)."
297
298 There are no implementation-defined conflict check policies.
299
300 *
301 "The representation for a compilation. See 10.1(2)."
302
303 A compilation is represented by a sequence of files presented to the
304 compiler in a single invocation of the *gcc* command.
305
306 *
307 "Any restrictions on compilations that contain multiple
308 compilation_units. See 10.1(4)."
309
310 No single file can contain more than one compilation unit, but any
311 sequence of files can be presented to the compiler as a single
312 compilation.
313
314 *
315 "The mechanisms for creating an environment and for adding
316 and replacing compilation units. See 10.1.4(3)."
317
318 See separate section on compilation model.
319
320 *
321 "The manner of explicitly assigning library units to a
322 partition. See 10.2(2)."
323
324 If a unit contains an Ada main program, then the Ada units for the partition
325 are determined by recursive application of the rules in the Ada Reference
326 Manual section 10.2(2-6). In other words, the Ada units will be those that
327 are needed by the main program, and then this definition of need is applied
328 recursively to those units, and the partition contains the transitive
329 closure determined by this relationship. In short, all the necessary units
330 are included, with no need to explicitly specify the list. If additional
331 units are required, e.g., by foreign language units, then all units must be
332 mentioned in the context clause of one of the needed Ada units.
333
334 If the partition contains no main program, or if the main program is in
335 a language other than Ada, then GNAT
336 provides the binder options *-z* and *-n* respectively, and in
337 this case a list of units can be explicitly supplied to the binder for
338 inclusion in the partition (all units needed by these units will also
339 be included automatically). For full details on the use of these
340 options, refer to *GNAT Make Program gnatmake* in the
341 :title:`GNAT User's Guide`.
342
343 *
344 "The implementation-defined means, if any, of specifying which compilation
345 units are needed by a given compilation unit. See 10.2(2)."
346
347 The units needed by a given compilation unit are as defined in
348 the Ada Reference Manual section 10.2(2-6). There are no
349 implementation-defined pragmas or other implementation-defined
350 means for specifying needed units.
351
352 *
353 "The manner of designating the main subprogram of a
354 partition. See 10.2(7)."
355
356 The main program is designated by providing the name of the
357 corresponding :file:`ALI` file as the input parameter to the binder.
358
359 *
360 "The order of elaboration of *library_items*. See 10.2(18)."
361
362 The first constraint on ordering is that it meets the requirements of
363 Chapter 10 of the Ada Reference Manual. This still leaves some
364 implementation-dependent choices, which are resolved by analyzing
365 the elaboration code of each unit and identifying implicit
366 elaboration-order dependencies.
367
368 *
369 "Parameter passing and function return for the main
370 subprogram. See 10.2(21)."
371
372 The main program has no parameters. It may be a procedure, or a function
373 returning an integer type. In the latter case, the returned integer
374 value is the return code of the program (overriding any value that
375 may have been set by a call to ``Ada.Command_Line.Set_Exit_Status``).
376
377 *
378 "The mechanisms for building and running partitions. See 10.2(24)."
379
380 GNAT itself supports programs with only a single partition. The GNATDIST
381 tool provided with the GLADE package (which also includes an implementation
382 of the PCS) provides a completely flexible method for building and running
383 programs consisting of multiple partitions. See the separate GLADE manual
384 for details.
385
386 *
387 "The details of program execution, including program
388 termination. See 10.2(25)."
389
390 See separate section on compilation model.
391
392 *
393 "The semantics of any non-active partitions supported by the
394 implementation. See 10.2(28)."
395
396 Passive partitions are supported on targets where shared memory is
397 provided by the operating system. See the GLADE reference manual for
398 further details.
399
400 *
401 "The information returned by ``Exception_Message``. See 11.4.1(10)."
402
403 Exception message returns the null string unless a specific message has
404 been passed by the program.
405
406 *
407 "The result of ``Exceptions.Exception_Name`` for types
408 declared within an unnamed *block_statement*. See 11.4.1(12)."
409
410 Blocks have implementation defined names of the form :samp:`B{nnn}`
411 where *nnn* is an integer.
412
413 *
414 "The information returned by
415 ``Exception_Information``. See 11.4.1(13)."
416
417 ``Exception_Information`` returns a string in the following format::
418
419 *Exception_Name:* nnnnn
420 *Message:* mmmmm
421 *PID:* ppp
422 *Load address:* 0xhhhh
423 *Call stack traceback locations:*
424 0xhhhh 0xhhhh 0xhhhh ... 0xhhh
425
426 where
427
428 * ``nnnn`` is the fully qualified name of the exception in all upper
429 case letters. This line is always present.
430
431 * ``mmmm`` is the message (this line present only if message is non-null)
432
433 * ``ppp`` is the Process Id value as a decimal integer (this line is
434 present only if the Process Id is nonzero). Currently we are
435 not making use of this field.
436
437 * The Load address line, the Call stack traceback locations line and the
438 following values are present only if at least one traceback location was
439 recorded. The Load address indicates the address at which the main executable
440 was loaded; this line may not be present if operating system hasn't relocated
441 the main executable. The values are given in C style format, with lower case
442 letters for a-f, and only as many digits present as are necessary.
443 The line terminator sequence at the end of each line, including
444 the last line is a single ``LF`` character (``16#0A#``).
445
446 *
447 "The sequence of characters of the value returned by
448 Exceptions.Exception_Name (respectively, Exceptions.Wide_Exception_Name)
449 when some of the graphic characters of Exceptions.Wide_Wide_Exception_Name
450 are not defined in Character (respectively, Wide_Character).
451 See 11.4.1(12.1)."
452
453 This is handled in the same way as the implementation-defined behavior
454 referenced in A.4.12(34).
455
456 *
457 "The information returned by Exception_Information. See 11.4.1(13)."
458
459 The exception name and the source location at which the exception was
460 raised are included.
461
462 *
463 "Implementation-defined policy_identifiers and assertion_aspect_marks
464 allowed in a pragma Assertion_Policy. See 11.4.2(9)."
465
466 Implementation-defined assertion_aspect_marks include Assert_And_Cut,
467 Assume, Contract_Cases, Debug, Ghost, Initial_Condition, Loop_Invariant,
468 Loop_Variant, Postcondition, Precondition, Predicate, Refined_Post,
469 Statement_Assertions, and Subprogram_Variant. Implementation-defined
470 policy_identifiers include Ignore and Suppressible.
471
472 *
473 "The default assertion policy. See 11.4.2(10)."
474
475 The default assertion policy is Ignore, although this can be overridden
476 via compiler switches such as "-gnata".
477
478 *
479 "Implementation-defined check names. See 11.5(27)."
480
481 The implementation-defined check names include Alignment_Check,
482 Container_Checks, Duplicated_Tag_Check, Predicate_Check,
483 Raise_Check, Tampering_Check, and Validity_Check. In addition, a
484 user program can add implementation-defined check names by means
485 of the pragma Check_Name. See the description of pragma
486 ``Suppress`` for details.
487
488 *
489 "Existence and meaning of second parameter of pragma Unsuppress.
490 See 11.5(27.1)."
491
492 The legality rules for and semantics of the second parameter of pragma
493 Unsuppress match those for the second argument of pragma Suppress.
494
495 *
496 "The cases that cause conflicts between the representation of the
497 ancestors of a type_declaration. See 13.1(13.1)."
498
499 No such cases exist.
500
501 *
502 "The interpretation of each representation aspect. See 13.1(20)."
503
504 See separate section on data representations.
505
506 *
507 "Any restrictions placed upon the specification of representation aspects.
508 See 13.1(20)."
509
510 See separate section on data representations.
511
512 *
513 "Implementation-defined aspects, including the syntax for specifying
514 such aspects and the legality rules for such aspects. See 13.1.1(38)."
515
516 See :ref:`Implementation_Defined_Aspects`.
517
518 *
519 "The set of machine scalars. See 13.3(8.1)."
520
521 See separate section on data representations.
522
523 *
524 "The meaning of ``Size`` for indefinite subtypes. See 13.3(48)."
525
526 The Size attribute of an indefinite subtype is not less than the Size
527 attribute of any object of that type.
528
529 *
530 "The meaning of Object_Size for indefinite subtypes. See 13.3(58)."
531
532 The Object_Size attribute of an indefinite subtype is not less than the
533 Object_Size attribute of any object of that type.
534
535 *
536 "The default external representation for a type tag. See 13.3(75)."
537
538 The default external representation for a type tag is the fully expanded
539 name of the type in upper case letters.
540
541 *
542 "What determines whether a compilation unit is the same in
543 two different partitions. See 13.3(76)."
544
545 A compilation unit is the same in two different partitions if and only
546 if it derives from the same source file.
547
548 *
549 "Implementation-defined components. See 13.5.1(15)."
550
551 The only implementation defined component is the tag for a tagged type,
552 which contains a pointer to the dispatching table.
553
554 *
555 "If ``Word_Size`` = ``Storage_Unit``, the default bit
556 ordering. See 13.5.3(5)."
557
558 ``Word_Size`` does not equal ``Storage_Unit`` in this implementation.
559
560 *
561 "The contents of the visible part of package ``System``. See 13.7(2)."
562
563 See the definition of package System in :file:`system.ads`.
564 Note that two declarations are added to package System.
565
566 .. code-block:: ada
567
568 Max_Priority : constant Positive := Priority'Last;
569 Max_Interrupt_Priority : constant Positive := Interrupt_Priority'Last;
570
571 *
572 "The range of Storage_Elements.Storage_Offset, the modulus of
573 Storage_Elements.Storage_Element, and the declaration of
574 Storage_Elements.Integer_Address. See 13.7.1(11)."
575
576 See the definition of package System.Storage_Elements in :file:`s-stoele.ads`.
577
578 *
579 "The contents of the visible part of package ``System.Machine_Code``,
580 and the meaning of *code_statements*. See 13.8(7)."
581
582 See the definition and documentation in file :file:`s-maccod.ads`.
583
584 *
585 "The result of unchecked conversion for instances with scalar result
586 types whose result is not defined by the language. See 13.9(11)."
587
588 Unchecked conversion between types of the same size
589 results in an uninterpreted transmission of the bits from one type
590 to the other. If the types are of unequal sizes, then in the case of
591 discrete types, a shorter source is first zero or sign extended as
592 necessary, and a shorter target is simply truncated on the left.
593 For all non-discrete types, the source is first copied if necessary
594 to ensure that the alignment requirements of the target are met, then
595 a pointer is constructed to the source value, and the result is obtained
596 by dereferencing this pointer after converting it to be a pointer to the
597 target type. Unchecked conversions where the target subtype is an
598 unconstrained array are not permitted. If the target alignment is
599 greater than the source alignment, then a copy of the result is
600 made with appropriate alignment
601
602 *
603 "The result of unchecked conversion for instances with nonscalar result
604 types whose result is not defined by the language. See 13.9(11)."
605
606 See preceding definition for the scalar result case.
607
608 *
609 "Whether or not the implementation provides user-accessible
610 names for the standard pool type(s). See 13.11(17)."
611
612 There are 3 different standard pools used by the compiler when
613 ``Storage_Pool`` is not specified depending whether the type is local
614 to a subprogram or defined at the library level and whether
615 ``Storage_Size``is specified or not. See documentation in the runtime
616 library units ``System.Pool_Global``, ``System.Pool_Size`` and
617 ``System.Pool_Local`` in files :file:`s-poosiz.ads`,
618 :file:`s-pooglo.ads` and :file:`s-pooloc.ads` for full details on the
619 default pools used. All these pools are accessible by means of `with`\ ing
620 these units.
621
622 *
623 "The meaning of ``Storage_Size`` when neither the Storage_Size nor the
624 Storage_Pool is specified for an access type. See 13.11(18)."
625
626 ``Storage_Size`` is measured in storage units, and refers to the
627 total space available for an access type collection, or to the primary
628 stack space for a task.
629
630 *
631 "The effect of specifying aspect Default_Storage_Pool on an instance
632 of a language-defined generic unit. See 13.11.3(5)."
633
634 Instances of language-defined generic units are treated the same as other
635 instances with respect to the Default_Storage_Pool aspect.
636
637 *
638 "Implementation-defined restrictions allowed in a pragma
639 ``Restrictions``. See 13.12(8.7)."
640
641 See :ref:`Standard_and_Implementation_Defined_Restrictions`.
642
643 *
644 "The consequences of violating limitations on
645 ``Restrictions`` pragmas. See 13.12(9)."
646
647 Restrictions that can be checked at compile time are enforced at
648 compile time; violations are illegal. For other restrictions, any
649 violation during program execution results in erroneous execution.
650
651 *
652 "Implementation-defined usage profiles allowed in a pragma Profile.
653 See 13.12(15)."
654
655 See :ref:`Implementation_Defined_Pragmas`.
656
657 *
658 "The contents of the stream elements read and written by the Read and
659 Write attributes of elementary types. See 13.13.2(9)."
660
661 The representation is the in-memory representation of the base type of
662 the type, using the number of bits corresponding to the
663 ``type'Size`` value, and the natural ordering of the machine.
664
665 *
666 "The names and characteristics of the numeric subtypes
667 declared in the visible part of package ``Standard``. See A.1(3)."
668
669 See items describing the integer and floating-point types supported.
670
671 *
672 "The values returned by Strings.Hash. See A.4.9(3)."
673
674 This hash function has predictable collisions and is subject to
675 equivalent substring attacks. It is not suitable for construction of a
676 hash table keyed on possibly malicious user input.
677
678 *
679 "The value returned by a call to a Text_Buffer Get procedure if any
680 character in the returned sequence is not defined in Character.
681 See A.4.12(34)."
682
683 The contents of a buffer is represented internally as a UTF_8 string.
684 The value return by Text_Buffer.Get is the result of passing that
685 UTF_8 string to UTF_Encoding.Strings.Decode.
686
687 *
688 "The value returned by a call to a Text_Buffer Wide_Get procedure if
689 any character in the returned sequence is not defined in Wide_Character.
690 See A.4.12(34)."
691
692 The contents of a buffer is represented internally as a UTF_8 string.
693 The value return by Text_Buffer.Wide_Get is the result of passing that
694 UTF_8 string to UTF_Encoding.Wide_Strings.Decode.
695
696 *
697 "The accuracy actually achieved by the elementary
698 functions. See A.5.1(1)."
699
700 The elementary functions correspond to the functions available in the C
701 library. Only fast math mode is implemented.
702
703 *
704 "The sign of a zero result from some of the operators or
705 functions in ``Numerics.Generic_Elementary_Functions``, when
706 ``Float_Type'Signed_Zeros`` is ``True``. See A.5.1(46)."
707
708 The sign of zeroes follows the requirements of the IEEE 754 standard on
709 floating-point.
710
711 *
712 "The value of
713 ``Numerics.Float_Random.Max_Image_Width``. See A.5.2(27)."
714
715 Maximum image width is 6864, see library file :file:`s-rannum.ads`.
716
717 *
718 "The value of
719 ``Numerics.Discrete_Random.Max_Image_Width``. See A.5.2(27)."
720
721 Maximum image width is 6864, see library file :file:`s-rannum.ads`.
722
723 *
724 "The string representation of a random number generator's
725 state. See A.5.2(38)."
726
727 The value returned by the Image function is the concatenation of
728 the fixed-width decimal representations of the 624 32-bit integers
729 of the state vector.
730
731 *
732 "The values of the ``Model_Mantissa``,
733 ``Model_Emin``, ``Model_Epsilon``, ``Model``,
734 ``Safe_First``, and ``Safe_Last`` attributes, if the Numerics
735 Annex is not supported. See A.5.3(72)."
736
737 Running the compiler with *-gnatS* to produce a listing of package
738 ``Standard`` displays the values of these attributes.
739
740 *
741 "The value of ``Buffer_Size`` in ``Storage_IO``. See A.9(10)."
742
743 All type representations are contiguous, and the ``Buffer_Size`` is
744 the value of ``type'Size`` rounded up to the next storage unit
745 boundary.
746
747 *
748 "External files for standard input, standard output, and
749 standard error See A.10(5)."
750
751 These files are mapped onto the files provided by the C streams
752 libraries. See source file :file:`i-cstrea.ads` for further details.
753
754 *
755 "The accuracy of the value produced by ``Put``. See A.10.9(36)."
756
757 If more digits are requested in the output than are represented by the
758 precision of the value, zeroes are output in the corresponding least
759 significant digit positions.
760
761 *
762 "Current size for a stream file for which positioning is not supported.
763 See A.12.1(1.1)."
764
765 Positioning is supported.
766
767 *
768 "The meaning of ``Argument_Count``, ``Argument``, and
769 ``Command_Name``. See A.15(1)."
770
771 These are mapped onto the ``argv`` and ``argc`` parameters of the
772 main program in the natural manner.
773
774 *
775 "The interpretation of file names and directory names. See A.16(46)."
776
777 These names are interpreted consistently with the underlying file system.
778
779 *
780 "The maxium value for a file size in Directories. See A.16(87)."
781
782 Directories.File_Size'Last is equal to Long_Long_Integer'Last .
783
784 *
785 "The result for Directories.Size for a directory or special file.
786 See A.16(93)."
787
788 Name_Error is raised.
789
790 *
791 "The result for Directories.Modification_Time for a directory or special file.
792 See A.16(93)."
793
794 Name_Error is raised.
795
796 *
797 "The interpretation of a nonnull search pattern in Directories.
798 See A.16(104)."
799
800 When the ``Pattern`` parameter is not the null string, it is interpreted
801 according to the syntax of regular expressions as defined in the
802 ``GNAT.Regexp`` package.
803
804 See :ref:`GNAT.Regexp_(g-regexp.ads)`.
805
806 *
807 "The results of a Directories search if the contents of the directory are
808 altered while a search is in progress. See A.16(110)."
809
810 The effect of a call to Get_Next_Entry is determined by the current
811 state of the directory.
812
813 *
814 "The definition and meaning of an environment variable. See A.17(1)."
815
816 This definition is determined by the underlying operating system.
817
818 *
819 "The circumstances where an environment variable cannot be defined.
820 See A.17(16)."
821
822 There are no such implementation-defined circumstances.
823
824 *
825 "Environment names for which Set has the effect of Clear. See A.17(17)."
826
827 There are no such names.
828
829 *
830 "The value of Containers.Hash_Type'Modulus. The value of
831 Containers.Count_Type'Last. See A.18.1(7)."
832
833 Containers.Hash_Type'Modulus is 2**32.
834 Containers.Count_Type'Last is 2**31 - 1.
835
836 *
837 "Implementation-defined convention names. See B.1(11)."
838
839 The following convention names are supported
840
841 .. tabularcolumns:: |l|L|
842
843 ======================= ==============================================================================
844 Convention Name Interpretation
845 ======================= ==============================================================================
846 *Ada* Ada
847 *Ada_Pass_By_Copy* Allowed for any types except by-reference types such as limited
848 records. Compatible with convention Ada, but causes any parameters
849 with this convention to be passed by copy.
850 *Ada_Pass_By_Reference* Allowed for any types except by-copy types such as scalars.
851 Compatible with convention Ada, but causes any parameters
852 with this convention to be passed by reference.
853 *Assembler* Assembly language
854 *Asm* Synonym for Assembler
855 *Assembly* Synonym for Assembler
856 *C* C
857 *C_Pass_By_Copy* Allowed only for record types, like C, but also notes that record
858 is to be passed by copy rather than reference.
859 *COBOL* COBOL
860 *C_Plus_Plus (or CPP)* C++
861 *Default* Treated the same as C
862 *External* Treated the same as C
863 *Fortran* Fortran
864 *Intrinsic* For support of pragma ``Import`` with convention Intrinsic, see
865 separate section on Intrinsic Subprograms.
866 *Stdcall* Stdcall (used for Windows implementations only). This convention correspond
867 to the WINAPI (previously called Pascal convention) C/C++ convention under
868 Windows. A routine with this convention cleans the stack before
869 exit. This pragma cannot be applied to a dispatching call.
870 *DLL* Synonym for Stdcall
871 *Win32* Synonym for Stdcall
872 *Stubbed* Stubbed is a special convention used to indicate that the body of the
873 subprogram will be entirely ignored. Any call to the subprogram
874 is converted into a raise of the ``Program_Error`` exception. If a
875 pragma ``Import`` specifies convention ``stubbed`` then no body need
876 be present at all. This convention is useful during development for the
877 inclusion of subprograms whose body has not yet been written.
878 In addition, all otherwise unrecognized convention names are also
879 treated as being synonymous with convention C. In all implementations,
880 use of such other names results in a warning.
881 ======================= ==============================================================================
882
883 *
884 "The meaning of link names. See B.1(36)."
885
886 Link names are the actual names used by the linker.
887
888 *
889 "The manner of choosing link names when neither the link name nor the
890 address of an imported or exported entity is specified. See B.1(36)."
891
892 The default linker name is that which would be assigned by the relevant
893 external language, interpreting the Ada name as being in all lower case
894 letters.
895
896 *
897 "The effect of pragma ``Linker_Options``. See B.1(37)."
898
899 The string passed to ``Linker_Options`` is presented uninterpreted as
900 an argument to the link command, unless it contains ASCII.NUL characters.
901 NUL characters if they appear act as argument separators, so for example
902
903 .. code-block:: ada
904
905 pragma Linker_Options ("-labc" & ASCII.NUL & "-ldef");
906
907 causes two separate arguments ``-labc`` and ``-ldef`` to be passed to the
908 linker. The order of linker options is preserved for a given unit. The final
909 list of options passed to the linker is in reverse order of the elaboration
910 order. For example, linker options for a body always appear before the options
911 from the corresponding package spec.
912
913 *
914 "The contents of the visible part of package
915 ``Interfaces`` and its language-defined descendants. See B.2(1)."
916
917 See files with prefix :file:`i-` in the distributed library.
918
919 *
920 "Implementation-defined children of package
921 ``Interfaces``. The contents of the visible part of package
922 ``Interfaces``. See B.2(11)."
923
924 See files with prefix :file:`i-` in the distributed library.
925
926 *
927 "The definitions of certain types and constants in Interfaces.C.
928 See B.3(41)."
929
930 See source file :file:`i-c.ads`.
931
932 *
933 "The types ``Floating``, ``Long_Floating``,
934 ``Binary``, ``Long_Binary``, ``Decimal_ Element``, and
935 ``COBOL_Character``; and the initialization of the variables
936 ``Ada_To_COBOL`` and ``COBOL_To_Ada``, in
937 ``Interfaces.COBOL``. See B.4(50)."
938
939 ===================== ====================================
940 COBOL Ada
941 ===================== ====================================
942 *Floating* Float
943 *Long_Floating* (Floating) Long_Float
944 *Binary* Integer
945 *Long_Binary* Long_Long_Integer
946 *Decimal_Element* Character
947 *COBOL_Character* Character
948 ===================== ====================================
949
950 For initialization, see the file :file:`i-cobol.ads` in the distributed library.
951
952 *
953 "The types Fortran_Integer, Real, Double_Precision, and Character_Set
954 in Interfaces.Fortran. See B.5(17)."
955
956 See source file :file:`i-fortra.ads`. These types are derived, respectively,
957 from Integer, Float, Long_Float, and Character.
958
959 *
960 "Implementation-defined intrinsic subprograms. See C.1(1)."
961
962 See separate section on Intrinsic Subprograms.
963
964 *
965 "Any restrictions on a protected procedure or its containing type when an
966 aspect Attach_handler or Interrupt_Handler is specified. See C.3.1(17)."
967
968 There are no such restrictions.
969
970 *
971 "Any other forms of interrupt handler supported by the Attach_Handler and
972 Interrupt_Handler aspects. See C.3.1(19)."
973
974 There are no such forms.
975
976 *
977 "The semantics of some attributes and functions of an entity for which
978 aspect Discard_Names is True. See C.5(7)."
979
980 If Discard_Names is True for an enumeration type, the Image attribute
981 provides the image of the Pos of the literal, and Value accepts
982 Pos values.
983
984 If both of the aspects``Discard_Names`` and ``No_Tagged_Streams`` are true
985 for a tagged type, its Expanded_Name and External_Tag values are
986 empty strings. This is useful to avoid exposing entity names at binary
987 level.
988
989 *
990 "The modulus and size of Test_and_Set_Flag. See C.6.3(8)."
991
992 The modulus is 2**8. The size is 8.
993
994 *
995 "The value used to represent the set value for Atomic_Test_and_Set.
996 See C.6.3(10)."
997
998 The value is 1.
999
1000 *
1001 "The result of the ``Task_Identification.Image``
1002 attribute. See C.7.1(7)."
1003
1004 The result of this attribute is a string that identifies
1005 the object or component that denotes a given task. If a variable ``Var``
1006 has a task type, the image for this task will have the form :samp:`Var_{XXXXXXXX}`,
1007 where the suffix *XXXXXXXX*
1008 is the hexadecimal representation of the virtual address of the corresponding
1009 task control block. If the variable is an array of tasks, the image of each
1010 task will have the form of an indexed component indicating the position of a
1011 given task in the array, e.g., :samp:`Group(5)_{XXXXXXX}`. If the task is a
1012 component of a record, the image of the task will have the form of a selected
1013 component. These rules are fully recursive, so that the image of a task that
1014 is a subcomponent of a composite object corresponds to the expression that
1015 designates this task.
1016
1017 If a task is created by an allocator, its image depends on the context. If the
1018 allocator is part of an object declaration, the rules described above are used
1019 to construct its image, and this image is not affected by subsequent
1020 assignments. If the allocator appears within an expression, the image
1021 includes only the name of the task type.
1022
1023 If the configuration pragma Discard_Names is present, or if the restriction
1024 No_Implicit_Heap_Allocation is in effect, the image reduces to
1025 the numeric suffix, that is to say the hexadecimal representation of the
1026 virtual address of the control block of the task.
1027
1028 *
1029 "The value of ``Current_Task`` when in a protected entry
1030 or interrupt handler. See C.7.1(17)."
1031
1032 Protected entries or interrupt handlers can be executed by any
1033 convenient thread, so the value of ``Current_Task`` is undefined.
1034
1035 *
1036 "Granularity of locking for Task_Attributes. See C.7.2(16)."
1037
1038 No locking is needed if the formal type Attribute has the size and
1039 alignment of either Integer or System.Address and the bit representation
1040 of Initial_Value is all zeroes. Otherwise, locking is performed.
1041
1042 *
1043 "The declarations of ``Any_Priority`` and
1044 ``Priority``. See D.1(11)."
1045
1046 See declarations in file :file:`system.ads`.
1047
1048 *
1049 "Implementation-defined execution resources. See D.1(15)."
1050
1051 There are no implementation-defined execution resources.
1052
1053 *
1054 "Whether, on a multiprocessor, a task that is waiting for
1055 access to a protected object keeps its processor busy. See D.2.1(3)."
1056
1057 On a multi-processor, a task that is waiting for access to a protected
1058 object does not keep its processor busy.
1059
1060 *
1061 "The affect of implementation defined execution resources
1062 on task dispatching. See D.2.1(9)."
1063
1064 Tasks map to threads in the threads package used by GNAT. Where possible
1065 and appropriate, these threads correspond to native threads of the
1066 underlying operating system.
1067
1068 *
1069 "Implementation-defined task dispatching policies. See D.2.2(3)."
1070
1071 There are no implementation-defined task dispatching policies.
1072
1073 *
1074 "The value of Default_Quantum in Dispatching.Round_Robin. See D.2.5(4)."
1075
1076 The value is 10 milliseconds.
1077
1078 *
1079 "Implementation-defined *policy_identifiers* allowed
1080 in a pragma ``Locking_Policy``. See D.3(4)."
1081
1082 The two implementation defined policies permitted in GNAT are
1083 ``Inheritance_Locking`` and ``Concurrent_Readers_Locking``. On
1084 targets that support the ``Inheritance_Locking`` policy, locking is
1085 implemented by inheritance, i.e., the task owning the lock operates
1086 at a priority equal to the highest priority of any task currently
1087 requesting the lock. On targets that support the
1088 ``Concurrent_Readers_Locking`` policy, locking is implemented with a
1089 read/write lock allowing multiple protected object functions to enter
1090 concurrently.
1091
1092 *
1093 "Default ceiling priorities. See D.3(10)."
1094
1095 The ceiling priority of protected objects of the type
1096 ``System.Interrupt_Priority'Last`` as described in the Ada
1097 Reference Manual D.3(10),
1098
1099 *
1100 "The ceiling of any protected object used internally by
1101 the implementation. See D.3(16)."
1102
1103 The ceiling priority of internal protected objects is
1104 ``System.Priority'Last``.
1105
1106 *
1107 "Implementation-defined queuing policies. See D.4(1)."
1108
1109 There are no implementation-defined queuing policies.
1110
1111 *
1112 "Implementation-defined admission policies. See D.4.1(1)."
1113
1114 There are no implementation-defined admission policies.
1115
1116 *
1117 "Any operations that implicitly require heap storage
1118 allocation. See D.7(8)."
1119
1120 The only operation that implicitly requires heap storage allocation is
1121 task creation.
1122
1123 *
1124 "When restriction No_Dynamic_CPU_Assignment applies to a partition, the
1125 processor on which a task with a CPU value of a Not_A_Specific_CPU will
1126 execute. See D.7(10)."
1127
1128 Unknown.
1129
1130 *
1131 "When restriction No_Task_Termination applies to a partition, what happens
1132 when a task terminates. See D.7(15.1)."
1133
1134 Execution is erroneous in that case.
1135
1136 *
1137 "The behavior when restriction Max_Storage_At_Blocking is violated.
1138 See D.7(17)."
1139
1140 Execution is erroneous in that case.
1141
1142 *
1143 "The behavior when restriction Max_Asynchronous_Select_Nesting is violated.
1144 See D.7(18)."
1145
1146 Execution is erroneous in that case.
1147
1148 *
1149 "The behavior when restriction Max_Tasks is violated. See D.7(19)."
1150
1151 Execution is erroneous in that case.
1152
1153 * "Whether the use of pragma Restrictions results in a reduction in program
1154 code or data size or execution time. See D.7(20)."
1155
1156 Yes it can, but the precise circumstances and properties of such reductions
1157 are difficult to characterize.
1158
1159 *
1160 "The value of Barrier_Limit'Last in Synchronous_Barriers. See D.10.1(4)."
1161
1162 Synchronous_Barriers.Barrier_Limit'Last is Integer'Last .
1163
1164 *
1165 "When an aborted task that is waiting on a Synchronous_Barrier is aborted.
1166 See D.10.1(13)."
1167
1168 Difficult to characterize.
1169
1170 *
1171 "The value of Min_Handler_Ceiling in Execution_Time.Group_Budgets.
1172 See D.14.2(7)."
1173
1174 See source file :file:`a-etgrbu.ads`.
1175
1176 *
1177 "The value of CPU_Range'Last in System.Multiprocessors. See D.16(4)."
1178
1179 See source file :file:`s-multip.ads`.
1180
1181 *
1182 "The processor on which the environment task executes in the absence
1183 of a value for the aspect CPU. See D.16(13)."
1184
1185 Unknown.
1186
1187 *
1188 "The means for creating and executing distributed
1189 programs. See E(5)."
1190
1191 The GLADE package provides a utility GNATDIST for creating and executing
1192 distributed programs. See the GLADE reference manual for further details.
1193
1194 *
1195 "Any events that can result in a partition becoming
1196 inaccessible. See E.1(7)."
1197
1198 See the GLADE reference manual for full details on such events.
1199
1200 *
1201 "The scheduling policies, treatment of priorities, and management of
1202 shared resources between partitions in certain cases. See E.1(11)."
1203
1204 See the GLADE reference manual for full details on these aspects of
1205 multi-partition execution.
1206
1207 *
1208 "Whether the execution of the remote subprogram is
1209 immediately aborted as a result of cancellation. See E.4(13)."
1210
1211 See the GLADE reference manual for details on the effect of abort in
1212 a distributed application.
1213
1214 *
1215 "The range of type System.RPC.Partition_Id. See E.5(14)."
1216
1217 System.RPC.Partition_ID'Last is Integer'Last. See source file :file:`s-rpc.ads`.
1218
1219 *
1220 "Implementation-defined interfaces in the PCS. See E.5(26)."
1221
1222 See the GLADE reference manual for a full description of all
1223 implementation defined interfaces.
1224
1225 *
1226 "The values of named numbers in the package
1227 ``Decimal``. See F.2(7)."
1228
1229 ==================== ==========
1230 Named Number Value
1231 ==================== ==========
1232 *Max_Scale* +18
1233 *Min_Scale* -18
1234 *Min_Delta* 1.0E-18
1235 *Max_Delta* 1.0E+18
1236 *Max_Decimal_Digits* 18
1237 ==================== ==========
1238
1239 *
1240 "The value of ``Max_Picture_Length`` in the package
1241 ``Text_IO.Editing``. See F.3.3(16)."
1242
1243 64
1244
1245 *
1246 "The value of ``Max_Picture_Length`` in the package
1247 ``Wide_Text_IO.Editing``. See F.3.4(5)."
1248
1249 64
1250
1251 *
1252 "The accuracy actually achieved by the complex elementary
1253 functions and by other complex arithmetic operations. See G.1(1)."
1254
1255 Standard library functions are used for the complex arithmetic
1256 operations. Only fast math mode is currently supported.
1257
1258 *
1259 "The sign of a zero result (or a component thereof) from
1260 any operator or function in ``Numerics.Generic_Complex_Types``, when
1261 ``Real'Signed_Zeros`` is True. See G.1.1(53)."
1262
1263 The signs of zero values are as recommended by the relevant
1264 implementation advice.
1265
1266 *
1267 "The sign of a zero result (or a component thereof) from
1268 any operator or function in
1269 ``Numerics.Generic_Complex_Elementary_Functions``, when
1270 ``Real'Signed_Zeros`` is ``True``. See G.1.2(45)."
1271
1272 The signs of zero values are as recommended by the relevant
1273 implementation advice.
1274
1275 *
1276 "Whether the strict mode or the relaxed mode is the
1277 default. See G.2(2)."
1278
1279 The strict mode is the default. There is no separate relaxed mode. GNAT
1280 provides a highly efficient implementation of strict mode.
1281
1282 *
1283 "The result interval in certain cases of fixed-to-float
1284 conversion. See G.2.1(10)."
1285
1286 For cases where the result interval is implementation dependent, the
1287 accuracy is that provided by performing all operations in 64-bit IEEE
1288 floating-point format.
1289
1290 *
1291 "The result of a floating point arithmetic operation in
1292 overflow situations, when the ``Machine_Overflows`` attribute of the
1293 result type is ``False``. See G.2.1(13)."
1294
1295 Infinite and NaN values are produced as dictated by the IEEE
1296 floating-point standard.
1297 Note that on machines that are not fully compliant with the IEEE
1298 floating-point standard, such as Alpha, the *-mieee* compiler flag
1299 must be used for achieving IEEE conforming behavior (although at the cost
1300 of a significant performance penalty), so infinite and NaN values are
1301 properly generated.
1302
1303 *
1304 "The result interval for division (or exponentiation by a
1305 negative exponent), when the floating point hardware implements division
1306 as multiplication by a reciprocal. See G.2.1(16)."
1307
1308 Not relevant, division is IEEE exact.
1309
1310 *
1311 "The definition of close result set, which determines the accuracy of
1312 certain fixed point multiplications and divisions. See G.2.3(5)."
1313
1314 Operations in the close result set are performed using IEEE long format
1315 floating-point arithmetic. The input operands are converted to
1316 floating-point, the operation is done in floating-point, and the result
1317 is converted to the target type.
1318
1319 *
1320 "Conditions on a *universal_real* operand of a fixed
1321 point multiplication or division for which the result shall be in the
1322 perfect result set. See G.2.3(22)."
1323
1324 The result is only defined to be in the perfect result set if the result
1325 can be computed by a single scaling operation involving a scale factor
1326 representable in 64 bits.
1327
1328 *
1329 "The result of a fixed point arithmetic operation in
1330 overflow situations, when the ``Machine_Overflows`` attribute of the
1331 result type is ``False``. See G.2.3(27)."
1332
1333 Not relevant, ``Machine_Overflows`` is ``True`` for fixed-point
1334 types.
1335
1336 *
1337 "The result of an elementary function reference in
1338 overflow situations, when the ``Machine_Overflows`` attribute of the
1339 result type is ``False``. See G.2.4(4)."
1340
1341 IEEE infinite and Nan values are produced as appropriate.
1342
1343 *
1344 "The value of the angle threshold, within which certain
1345 elementary functions, complex arithmetic operations, and complex
1346 elementary functions yield results conforming to a maximum relative
1347 error bound. See G.2.4(10)."
1348
1349 Information on this subject is not yet available.
1350
1351 *
1352 "The accuracy of certain elementary functions for
1353 parameters beyond the angle threshold. See G.2.4(10)."
1354
1355 Information on this subject is not yet available.
1356
1357 *
1358 "The result of a complex arithmetic operation or complex
1359 elementary function reference in overflow situations, when the
1360 ``Machine_Overflows`` attribute of the corresponding real type is
1361 ``False``. See G.2.6(5)."
1362
1363 IEEE infinite and Nan values are produced as appropriate.
1364
1365 *
1366 "The accuracy of certain complex arithmetic operations and
1367 certain complex elementary functions for parameters (or components
1368 thereof) beyond the angle threshold. See G.2.6(8)."
1369
1370 Information on those subjects is not yet available.
1371
1372 *
1373 "The accuracy requirements for the subprograms Solve, Inverse,
1374 Determinant, Eigenvalues and Eigensystem for type Real_Matrix.
1375 See G.3.1(81)."
1376
1377 Information on those subjects is not yet available.
1378
1379 *
1380 "The accuracy requirements for the subprograms Solve, Inverse,
1381 Determinant, Eigenvalues and Eigensystem for type Complex_Matrix.
1382 See G.3.2(149)."
1383
1384 Information on those subjects is not yet available.
1385
1386 *
1387 "The consequences of violating No_Hidden_Indirect_Globals. See H.4(23.9)."
1388
1389 Execution is erroneous in that case.