Debian Codegraph @

gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst

raw
1 .. _Implementation_of_Ada_2012_Features:
2
3 ***********************************
4 Implementation of Ada 2012 Features
5 ***********************************
6
7 .. index:: Ada 2012 implementation status
8
9 .. index:: -gnat12 option (gcc)
10
11 .. index:: pragma Ada_2012
12
13 .. index:: configuration pragma Ada_2012
14
15 .. index:: Ada_2012 configuration pragma
16
17 This chapter contains a complete list of Ada 2012 features that have been
18 implemented.
19 Generally, these features are only
20 available if the *-gnat12* (Ada 2012 features enabled) option is set,
21 which is the default behavior,
22 or if the configuration pragma ``Ada_2012`` is used.
23
24 However, new pragmas, attributes, and restrictions are
25 unconditionally available, since the Ada 95 standard allows the addition of
26 new pragmas, attributes, and restrictions (there are exceptions, which are
27 documented in the individual descriptions), and also certain packages
28 were made available in earlier versions of Ada.
29
30 An ISO date (YYYY-MM-DD) appears in parentheses on the description line.
31 This date shows the implementation date of the feature. Any wavefront
32 subsequent to this date will contain the indicated feature, as will any
33 subsequent releases. A date of 0000-00-00 means that GNAT has always
34 implemented the feature, or implemented it as soon as it appeared as a
35 binding interpretation.
36
37 Each feature corresponds to an Ada Issue ('AI') approved by the Ada
38 standardization group (ISO/IEC JTC1/SC22/WG9) for inclusion in Ada 2012.
39 The features are ordered based on the relevant sections of the Ada
40 Reference Manual ("RM"). When a given AI relates to multiple points
41 in the RM, the earliest is used.
42
43 A complete description of the AIs may be found in
44 http://www.ada-auth.org/ai05-summary.html.
45
46 .. index:: AI-0176 (Ada 2012 feature)
47
48 * *AI-0176 Quantified expressions (2010-09-29)*
49
50 Both universally and existentially quantified expressions are implemented.
51 They use the new syntax for iterators proposed in AI05-139-2, as well as
52 the standard Ada loop syntax.
53
54 RM References: 1.01.04 (12) 2.09 (2/2) 4.04 (7) 4.05.09 (0)
55
56 .. index:: AI-0079 (Ada 2012 feature)
57
58 * *AI-0079 Allow other_format characters in source (2010-07-10)*
59
60 Wide characters in the unicode category *other_format* are now allowed in
61 source programs between tokens, but not within a token such as an identifier.
62
63 RM References: 2.01 (4/2) 2.02 (7)
64
65 .. index:: AI-0091 (Ada 2012 feature)
66
67 * *AI-0091 Do not allow other_format in identifiers (0000-00-00)*
68
69 Wide characters in the unicode category *other_format* are not permitted
70 within an identifier, since this can be a security problem. The error
71 message for this case has been improved to be more specific, but GNAT has
72 never allowed such characters to appear in identifiers.
73
74 RM References: 2.03 (3.1/2) 2.03 (4/2) 2.03 (5/2) 2.03 (5.1/2) 2.03 (5.2/2) 2.03 (5.3/2) 2.09 (2/2)
75
76 .. index:: AI-0100 (Ada 2012 feature)
77
78 * *AI-0100 Placement of pragmas (2010-07-01)*
79
80 This AI is an earlier version of AI-163. It simplifies the rules
81 for legal placement of pragmas. In the case of lists that allow pragmas, if
82 the list may have no elements, then the list may consist solely of pragmas.
83
84 RM References: 2.08 (7)
85
86 .. index:: AI-0163 (Ada 2012 feature)
87
88 * *AI-0163 Pragmas in place of null (2010-07-01)*
89
90 A statement sequence may be composed entirely of pragmas. It is no longer
91 necessary to add a dummy ``null`` statement to make the sequence legal.
92
93 RM References: 2.08 (7) 2.08 (16)
94
95 .. index:: AI-0080 (Ada 2012 feature)
96
97 * *AI-0080 'View of' not needed if clear from context (0000-00-00)*
98
99 This is an editorial change only, described as non-testable in the AI.
100
101 RM References: 3.01 (7)
102
103 .. index:: AI-0183 (Ada 2012 feature)
104
105 * *AI-0183 Aspect specifications (2010-08-16)*
106
107 Aspect specifications have been fully implemented except for pre and post-
108 conditions, and type invariants, which have their own separate AI's. All
109 forms of declarations listed in the AI are supported. The following is a
110 list of the aspects supported (with GNAT implementation aspects marked)
111
112 ==================================== ===========
113 Supported Aspect Source
114 ==================================== ===========
115 ``Ada_2005`` -- GNAT
116 ``Ada_2012`` -- GNAT
117 ``Address``
118 ``Alignment``
119 ``Atomic``
120 ``Atomic_Components``
121 ``Bit_Order``
122 ``Component_Size``
123 ``Contract_Cases`` -- GNAT
124 ``Discard_Names``
125 ``External_Tag``
126 ``Favor_Top_Level`` -- GNAT
127 ``Inline``
128 ``Inline_Always`` -- GNAT
129 ``Invariant`` -- GNAT
130 ``Machine_Radix``
131 ``No_Return``
132 ``Object_Size`` -- GNAT
133 ``Pack``
134 ``Persistent_BSS`` -- GNAT
135 ``Post``
136 ``Pre``
137 ``Predicate``
138 ``Preelaborable_Initialization``
139 ``Pure_Function`` -- GNAT
140 ``Remote_Access_Type`` -- GNAT
141 ``Shared`` -- GNAT
142 ``Size``
143 ``Storage_Pool``
144 ``Storage_Size``
145 ``Stream_Size``
146 ``Suppress``
147 ``Suppress_Debug_Info`` -- GNAT
148 ``Test_Case`` -- GNAT
149 ``Thread_Local_Storage`` -- GNAT
150 ``Type_Invariant``
151 ``Unchecked_Union``
152 ``Universal_Aliasing`` -- GNAT
153 ``Unmodified`` -- GNAT
154 ``Unreferenced`` -- GNAT
155 ``Unreferenced_Objects`` -- GNAT
156 ``Unsuppress``
157 ``Value_Size`` -- GNAT
158 ``Volatile``
159 ``Volatile_Components``
160 ``Warnings`` -- GNAT
161 ==================================== ===========
162
163 Note that for aspects with an expression, e.g. ``Size``, the expression is
164 treated like a default expression (visibility is analyzed at the point of
165 occurrence of the aspect, but evaluation of the expression occurs at the
166 freeze point of the entity involved).
167
168 RM References: 3.02.01 (3) 3.02.02 (2) 3.03.01 (2/2) 3.08 (6)
169 3.09.03 (1.1/2) 6.01 (2/2) 6.07 (2/2) 9.05.02 (2/2) 7.01 (3) 7.03
170 (2) 7.03 (3) 9.01 (2/2) 9.01 (3/2) 9.04 (2/2) 9.04 (3/2)
171 9.05.02 (2/2) 11.01 (2) 12.01 (3) 12.03 (2/2) 12.04 (2/2) 12.05 (2)
172 12.06 (2.1/2) 12.06 (2.2/2) 12.07 (2) 13.01 (0.1/2) 13.03 (5/1)
173 13.03.01 (0)
174
175 .. index:: AI-0128 (Ada 2012 feature)
176
177 * *AI-0128 Inequality is a primitive operation (0000-00-00)*
178
179 If an equality operator ("=") is declared for a type, then the implicitly
180 declared inequality operator ("/=") is a primitive operation of the type.
181 This is the only reasonable interpretation, and is the one always implemented
182 by GNAT, but the RM was not entirely clear in making this point.
183
184 RM References: 3.02.03 (6) 6.06 (6)
185
186 .. index:: AI-0003 (Ada 2012 feature)
187
188 * *AI-0003 Qualified expressions as names (2010-07-11)*
189
190 In Ada 2012, a qualified expression is considered to be syntactically a name,
191 meaning that constructs such as ``A'(F(X)).B`` are now legal. This is
192 useful in disambiguating some cases of overloading.
193
194 RM References: 3.03 (11) 3.03 (21) 4.01 (2) 4.04 (7) 4.07 (3)
195 5.04 (7)
196
197 .. index:: AI-0120 (Ada 2012 feature)
198
199 * *AI-0120 Constant instance of protected object (0000-00-00)*
200
201 This is an RM editorial change only. The section that lists objects that are
202 constant failed to include the current instance of a protected object
203 within a protected function. This has always been treated as a constant
204 in GNAT.
205
206 RM References: 3.03 (21)
207
208 .. index:: AI-0008 (Ada 2012 feature)
209
210 * *AI-0008 General access to constrained objects (0000-00-00)*
211
212 The wording in the RM implied that if you have a general access to a
213 constrained object, it could be used to modify the discriminants. This was
214 obviously not intended. ``Constraint_Error`` should be raised, and GNAT
215 has always done so in this situation.
216
217 RM References: 3.03 (23) 3.10.02 (26/2) 4.01 (9) 6.04.01 (17) 8.05.01 (5/2)
218
219 .. index:: AI-0093 (Ada 2012 feature)
220
221 * *AI-0093 Additional rules use immutably limited (0000-00-00)*
222
223 This is an editorial change only, to make more widespread use of the Ada 2012
224 'immutably limited'.
225
226 RM References: 3.03 (23.4/3)
227
228 .. index:: AI-0096 (Ada 2012 feature)
229
230 * *AI-0096 Deriving from formal private types (2010-07-20)*
231
232 In general it is illegal for a type derived from a formal limited type to be
233 nonlimited. This AI makes an exception to this rule: derivation is legal
234 if it appears in the private part of the generic, and the formal type is not
235 tagged. If the type is tagged, the legality check must be applied to the
236 private part of the package.
237
238 RM References: 3.04 (5.1/2) 6.02 (7)
239
240 .. index:: AI-0181 (Ada 2012 feature)
241
242 * *AI-0181 Soft hyphen is a non-graphic character (2010-07-23)*
243
244 From Ada 2005 on, soft hyphen is considered a non-graphic character, which
245 means that it has a special name (``SOFT_HYPHEN``) in conjunction with the
246 ``Image`` and ``Value`` attributes for the character types. Strictly
247 speaking this is an inconsistency with Ada 95, but in practice the use of
248 these attributes is so obscure that it will not cause problems.
249
250 RM References: 3.05.02 (2/2) A.01 (35/2) A.03.03 (21)
251
252 .. index:: AI-0182 (Ada 2012 feature)
253
254 * *AI-0182 Additional forms for* ``Character'Value`` *(0000-00-00)*
255
256 This AI allows ``Character'Value`` to accept the string ``'?'`` where
257 ``?`` is any character including non-graphic control characters. GNAT has
258 always accepted such strings. It also allows strings such as
259 ``HEX_00000041`` to be accepted, but GNAT does not take advantage of this
260 permission and raises ``Constraint_Error``, as is certainly still
261 permitted.
262
263 RM References: 3.05 (56/2)
264
265 .. index:: AI-0214 (Ada 2012 feature)
266
267 * *AI-0214 Defaulted discriminants for limited tagged (2010-10-01)*
268
269 Ada 2012 relaxes the restriction that forbids discriminants of tagged types
270 to have default expressions by allowing them when the type is limited. It
271 is often useful to define a default value for a discriminant even though
272 it can't be changed by assignment.
273
274 RM References: 3.07 (9.1/2) 3.07.02 (3)
275
276 .. index:: AI-0102 (Ada 2012 feature)
277
278 * *AI-0102 Some implicit conversions are illegal (0000-00-00)*
279
280 It is illegal to assign an anonymous access constant to an anonymous access
281 variable. The RM did not have a clear rule to prevent this, but GNAT has
282 always generated an error for this usage.
283
284 RM References: 3.07 (16) 3.07.01 (9) 6.04.01 (6) 8.06 (27/2)
285
286 .. index:: AI-0158 (Ada 2012 feature)
287
288 * *AI-0158 Generalizing membership tests (2010-09-16)*
289
290 This AI extends the syntax of membership tests to simplify complex conditions
291 that can be expressed as membership in a subset of values of any type. It
292 introduces syntax for a list of expressions that may be used in loop contexts
293 as well.
294
295 RM References: 3.08.01 (5) 4.04 (3) 4.05.02 (3) 4.05.02 (5) 4.05.02 (27)
296
297 .. index:: AI-0173 (Ada 2012 feature)
298
299 * *AI-0173 Testing if tags represent abstract types (2010-07-03)*
300
301 The function ``Ada.Tags.Type_Is_Abstract`` returns ``True`` if invoked
302 with the tag of an abstract type, and ``False`` otherwise.
303
304 RM References: 3.09 (7.4/2) 3.09 (12.4/2)
305
306 .. index:: AI-0076 (Ada 2012 feature)
307
308 * *AI-0076 function with controlling result (0000-00-00)*
309
310 This is an editorial change only. The RM defines calls with controlling
311 results, but uses the term 'function with controlling result' without an
312 explicit definition.
313
314 RM References: 3.09.02 (2/2)
315
316 .. index:: AI-0126 (Ada 2012 feature)
317
318 * *AI-0126 Dispatching with no declared operation (0000-00-00)*
319
320 This AI clarifies dispatching rules, and simply confirms that dispatching
321 executes the operation of the parent type when there is no explicitly or
322 implicitly declared operation for the descendant type. This has always been
323 the case in all versions of GNAT.
324
325 RM References: 3.09.02 (20/2) 3.09.02 (20.1/2) 3.09.02 (20.2/2)
326
327 .. index:: AI-0097 (Ada 2012 feature)
328
329 * *AI-0097 Treatment of abstract null extension (2010-07-19)*
330
331 The RM as written implied that in some cases it was possible to create an
332 object of an abstract type, by having an abstract extension inherit a non-
333 abstract constructor from its parent type. This mistake has been corrected
334 in GNAT and in the RM, and this construct is now illegal.
335
336 RM References: 3.09.03 (4/2)
337
338 .. index:: AI-0203 (Ada 2012 feature)
339
340 * *AI-0203 Extended return cannot be abstract (0000-00-00)*
341
342 A return_subtype_indication cannot denote an abstract subtype. GNAT has never
343 permitted such usage.
344
345 RM References: 3.09.03 (8/3)
346
347 .. index:: AI-0198 (Ada 2012 feature)
348
349 * *AI-0198 Inheriting abstract operators (0000-00-00)*
350
351 This AI resolves a conflict between two rules involving inherited abstract
352 operations and predefined operators. If a derived numeric type inherits
353 an abstract operator, it overrides the predefined one. This interpretation
354 was always the one implemented in GNAT.
355
356 RM References: 3.09.03 (4/3)
357
358 .. index:: AI-0073 (Ada 2012 feature)
359
360 * *AI-0073 Functions returning abstract types (2010-07-10)*
361
362 This AI covers a number of issues regarding returning abstract types. In
363 particular generic functions cannot have abstract result types or access
364 result types designated an abstract type. There are some other cases which
365 are detailed in the AI. Note that this binding interpretation has not been
366 retrofitted to operate before Ada 2012 mode, since it caused a significant
367 number of regressions.
368
369 RM References: 3.09.03 (8) 3.09.03 (10) 6.05 (8/2)
370
371 .. index:: AI-0070 (Ada 2012 feature)
372
373 * *AI-0070 Elaboration of interface types (0000-00-00)*
374
375 This is an editorial change only, there are no testable consequences short of
376 checking for the absence of generated code for an interface declaration.
377
378 RM References: 3.09.04 (18/2)
379
380 .. index:: AI-0208 (Ada 2012 feature)
381
382 * *AI-0208 Characteristics of incomplete views (0000-00-00)*
383
384 The wording in the Ada 2005 RM concerning characteristics of incomplete views
385 was incorrect and implied that some programs intended to be legal were now
386 illegal. GNAT had never considered such programs illegal, so it has always
387 implemented the intent of this AI.
388
389 RM References: 3.10.01 (2.4/2) 3.10.01 (2.6/2)
390
391 .. index:: AI-0162 (Ada 2012 feature)
392
393 * *AI-0162 Incomplete type completed by partial view (2010-09-15)*
394
395 Incomplete types are made more useful by allowing them to be completed by
396 private types and private extensions.
397
398 RM References: 3.10.01 (2.5/2) 3.10.01 (2.6/2) 3.10.01 (3) 3.10.01 (4/2)
399
400 .. index:: AI-0098 (Ada 2012 feature)
401
402 * *AI-0098 Anonymous subprogram access restrictions (0000-00-00)*
403
404 An unintentional omission in the RM implied some inconsistent restrictions on
405 the use of anonymous access to subprogram values. These restrictions were not
406 intentional, and have never been enforced by GNAT.
407
408 RM References: 3.10.01 (6) 3.10.01 (9.2/2)
409
410 .. index:: AI-0199 (Ada 2012 feature)
411
412 * *AI-0199 Aggregate with anonymous access components (2010-07-14)*
413
414 A choice list in a record aggregate can include several components of
415 (distinct) anonymous access types as long as they have matching designated
416 subtypes.
417
418 RM References: 4.03.01 (16)
419
420 .. index:: AI-0220 (Ada 2012 feature)
421
422 * *AI-0220 Needed components for aggregates (0000-00-00)*
423
424 This AI addresses a wording problem in the RM that appears to permit some
425 complex cases of aggregates with nonstatic discriminants. GNAT has always
426 implemented the intended semantics.
427
428 RM References: 4.03.01 (17)
429
430 .. index:: AI-0147 (Ada 2012 feature)
431
432 * *AI-0147 Conditional expressions (2009-03-29)*
433
434 Conditional expressions are permitted. The form of such an expression is:
435
436 ::
437
438 (if expr then expr {elsif expr then expr} [else expr])
439
440 The parentheses can be omitted in contexts where parentheses are present
441 anyway, such as subprogram arguments and pragma arguments. If the **else**
442 clause is omitted, **else** *True* is assumed;
443 thus ``(if A then B)`` is a way to conveniently represent
444 *(A implies B)* in standard logic.
445
446 RM References: 4.03.03 (15) 4.04 (1) 4.04 (7) 4.05.07 (0) 4.07 (2)
447 4.07 (3) 4.09 (12) 4.09 (33) 5.03 (3) 5.03 (4) 7.05 (2.1/2)
448
449 .. index:: AI-0037 (Ada 2012 feature)
450
451 * *AI-0037 Out-of-range box associations in aggregate (0000-00-00)*
452
453 This AI confirms that an association of the form ``Indx => <>`` in an
454 array aggregate must raise ``Constraint_Error`` if ``Indx``
455 is out of range. The RM specified a range check on other associations, but
456 not when the value of the association was defaulted. GNAT has always inserted
457 a constraint check on the index value.
458
459 RM References: 4.03.03 (29)
460
461 .. index:: AI-0123 (Ada 2012 feature)
462
463 * *AI-0123 Composability of equality (2010-04-13)*
464
465 Equality of untagged record composes, so that the predefined equality for a
466 composite type that includes a component of some untagged record type
467 ``R`` uses the equality operation of ``R`` (which may be user-defined
468 or predefined). This makes the behavior of untagged records identical to that
469 of tagged types in this respect.
470
471 This change is an incompatibility with previous versions of Ada, but it
472 corrects a non-uniformity that was often a source of confusion. Analysis of
473 a large number of industrial programs indicates that in those rare cases
474 where a composite type had an untagged record component with a user-defined
475 equality, either there was no use of the composite equality, or else the code
476 expected the same composability as for tagged types, and thus had a bug that
477 would be fixed by this change.
478
479 RM References: 4.05.02 (9.7/2) 4.05.02 (14) 4.05.02 (15) 4.05.02 (24)
480 8.05.04 (8)
481
482 .. index:: AI-0088 (Ada 2012 feature)
483
484 * *AI-0088 The value of exponentiation (0000-00-00)*
485
486 This AI clarifies the equivalence rule given for the dynamic semantics of
487 exponentiation: the value of the operation can be obtained by repeated
488 multiplication, but the operation can be implemented otherwise (for example
489 using the familiar divide-by-two-and-square algorithm, even if this is less
490 accurate), and does not imply repeated reads of a volatile base.
491
492 RM References: 4.05.06 (11)
493
494 .. index:: AI-0188 (Ada 2012 feature)
495
496 * *AI-0188 Case expressions (2010-01-09)*
497
498 Case expressions are permitted. This allows use of constructs such as:
499
500 .. code-block:: ada
501
502 X := (case Y is when 1 => 2, when 2 => 3, when others => 31)
503
504 RM References: 4.05.07 (0) 4.05.08 (0) 4.09 (12) 4.09 (33)
505
506 .. index:: AI-0104 (Ada 2012 feature)
507
508 * *AI-0104 Null exclusion and uninitialized allocator (2010-07-15)*
509
510 The assignment ``Ptr := new not null Some_Ptr;`` will raise
511 ``Constraint_Error`` because the default value of the allocated object is
512 **null**. This useless construct is illegal in Ada 2012.
513
514 RM References: 4.08 (2)
515
516 .. index:: AI-0157 (Ada 2012 feature)
517
518 * *AI-0157 Allocation/Deallocation from empty pool (2010-07-11)*
519
520 Allocation and Deallocation from an empty storage pool (i.e. allocation or
521 deallocation of a pointer for which a static storage size clause of zero
522 has been given) is now illegal and is detected as such. GNAT
523 previously gave a warning but not an error.
524
525 RM References: 4.08 (5.3/2) 13.11.02 (4) 13.11.02 (17)
526
527 .. index:: AI-0179 (Ada 2012 feature)
528
529 * *AI-0179 Statement not required after label (2010-04-10)*
530
531 It is not necessary to have a statement following a label, so a label
532 can appear at the end of a statement sequence without the need for putting a
533 null statement afterwards, but it is not allowable to have only labels and
534 no real statements in a statement sequence.
535
536 RM References: 5.01 (2)
537
538 .. index:: AI-0139-2 (Ada 2012 feature)
539
540 * *AI-0139-2 Syntactic sugar for iterators (2010-09-29)*
541
542 The new syntax for iterating over arrays and containers is now implemented.
543 Iteration over containers is for now limited to read-only iterators. Only
544 default iterators are supported, with the syntax: ``for Elem of C``.
545
546 RM References: 5.05
547
548 .. index:: AI-0134 (Ada 2012 feature)
549
550 * *AI-0134 Profiles must match for full conformance (0000-00-00)*
551
552 For full conformance, the profiles of anonymous-access-to-subprogram
553 parameters must match. GNAT has always enforced this rule.
554
555 RM References: 6.03.01 (18)
556
557 .. index:: AI-0207 (Ada 2012 feature)
558
559 * *AI-0207 Mode conformance and access constant (0000-00-00)*
560
561 This AI confirms that access_to_constant indication must match for mode
562 conformance. This was implemented in GNAT when the qualifier was originally
563 introduced in Ada 2005.
564
565 RM References: 6.03.01 (16/2)
566
567 .. index:: AI-0046 (Ada 2012 feature)
568
569 * *AI-0046 Null exclusion match for full conformance (2010-07-17)*
570
571 For full conformance, in the case of access parameters, the null exclusion
572 must match (either both or neither must have ``not null``).
573
574 RM References: 6.03.02 (18)
575
576 .. index:: AI-0118 (Ada 2012 feature)
577
578 * *AI-0118 The association of parameter associations (0000-00-00)*
579
580 This AI clarifies the rules for named associations in subprogram calls and
581 generic instantiations. The rules have been in place since Ada 83.
582
583 RM References: 6.04.01 (2) 12.03 (9)
584
585 .. index:: AI-0196 (Ada 2012 feature)
586
587 * *AI-0196 Null exclusion tests for out parameters (0000-00-00)*
588
589 Null exclusion checks are not made for ``out`` parameters when
590 evaluating the actual parameters. GNAT has never generated these checks.
591
592 RM References: 6.04.01 (13)
593
594 .. index:: AI-0015 (Ada 2012 feature)
595
596 * *AI-0015 Constant return objects (0000-00-00)*
597
598 The return object declared in an *extended_return_statement* may be
599 declared constant. This was always intended, and GNAT has always allowed it.
600
601 RM References: 6.05 (2.1/2) 3.03 (10/2) 3.03 (21) 6.05 (5/2)
602 6.05 (5.7/2)
603
604 .. index:: AI-0032 (Ada 2012 feature)
605
606 * *AI-0032 Extended return for class-wide functions (0000-00-00)*
607
608 If a function returns a class-wide type, the object of an extended return
609 statement can be declared with a specific type that is covered by the class-
610 wide type. This has been implemented in GNAT since the introduction of
611 extended returns. Note AI-0103 complements this AI by imposing matching
612 rules for constrained return types.
613
614 RM References: 6.05 (5.2/2) 6.05 (5.3/2) 6.05 (5.6/2) 6.05 (5.8/2)
615 6.05 (8/2)
616
617 .. index:: AI-0103 (Ada 2012 feature)
618
619 * *AI-0103 Static matching for extended return (2010-07-23)*
620
621 If the return subtype of a function is an elementary type or a constrained
622 type, the subtype indication in an extended return statement must match
623 statically this return subtype.
624
625 RM References: 6.05 (5.2/2)
626
627 .. index:: AI-0058 (Ada 2012 feature)
628
629 * *AI-0058 Abnormal completion of an extended return (0000-00-00)*
630
631 The RM had some incorrect wording implying wrong treatment of abnormal
632 completion in an extended return. GNAT has always implemented the intended
633 correct semantics as described by this AI.
634
635 RM References: 6.05 (22/2)
636
637 .. index:: AI-0050 (Ada 2012 feature)
638
639 * *AI-0050 Raising Constraint_Error early for function call (0000-00-00)*
640
641 The implementation permissions for raising ``Constraint_Error`` early on a function call
642 when it was clear an exception would be raised were over-permissive and allowed
643 mishandling of discriminants in some cases. GNAT did
644 not take advantage of these incorrect permissions in any case.
645
646 RM References: 6.05 (24/2)
647
648 .. index:: AI-0125 (Ada 2012 feature)
649
650 * *AI-0125 Nonoverridable operations of an ancestor (2010-09-28)*
651
652 In Ada 2012, the declaration of a primitive operation of a type extension
653 or private extension can also override an inherited primitive that is not
654 visible at the point of this declaration.
655
656 RM References: 7.03.01 (6) 8.03 (23) 8.03.01 (5/2) 8.03.01 (6/2)
657
658 .. index:: AI-0062 (Ada 2012 feature)
659
660 * *AI-0062 Null exclusions and deferred constants (0000-00-00)*
661
662 A full constant may have a null exclusion even if its associated deferred
663 constant does not. GNAT has always allowed this.
664
665 RM References: 7.04 (6/2) 7.04 (7.1/2)
666
667 .. index:: AI-0178 (Ada 2012 feature)
668
669 * *AI-0178 Incomplete views are limited (0000-00-00)*
670
671 This AI clarifies the role of incomplete views and plugs an omission in the
672 RM. GNAT always correctly restricted the use of incomplete views and types.
673
674 RM References: 7.05 (3/2) 7.05 (6/2)
675
676 .. index:: AI-0087 (Ada 2012 feature)
677
678 * *AI-0087 Actual for formal nonlimited derived type (2010-07-15)*
679
680 The actual for a formal nonlimited derived type cannot be limited. In
681 particular, a formal derived type that extends a limited interface but which
682 is not explicitly limited cannot be instantiated with a limited type.
683
684 RM References: 7.05 (5/2) 12.05.01 (5.1/2)
685
686 .. index:: AI-0099 (Ada 2012 feature)
687
688 * *AI-0099 Tag determines whether finalization needed (0000-00-00)*
689
690 This AI clarifies that 'needs finalization' is part of dynamic semantics,
691 and therefore depends on the run-time characteristics of an object (i.e. its
692 tag) and not on its nominal type. As the AI indicates: "we do not expect
693 this to affect any implementation''.
694
695 RM References: 7.06.01 (6) 7.06.01 (7) 7.06.01 (8) 7.06.01 (9/2)
696
697 .. index:: AI-0064 (Ada 2012 feature)
698
699 * *AI-0064 Redundant finalization rule (0000-00-00)*
700
701 This is an editorial change only. The intended behavior is already checked
702 by an existing ACATS test, which GNAT has always executed correctly.
703
704 RM References: 7.06.01 (17.1/1)
705
706 .. index:: AI-0026 (Ada 2012 feature)
707
708 * *AI-0026 Missing rules for Unchecked_Union (2010-07-07)*
709
710 Record representation clauses concerning Unchecked_Union types cannot mention
711 the discriminant of the type. The type of a component declared in the variant
712 part of an Unchecked_Union cannot be controlled, have controlled components,
713 nor have protected or task parts. If an Unchecked_Union type is declared
714 within the body of a generic unit or its descendants, then the type of a
715 component declared in the variant part cannot be a formal private type or a
716 formal private extension declared within the same generic unit.
717
718 RM References: 7.06 (9.4/2) B.03.03 (9/2) B.03.03 (10/2)
719
720 .. index:: AI-0205 (Ada 2012 feature)
721
722 * *AI-0205 Extended return declares visible name (0000-00-00)*
723
724 This AI corrects a simple omission in the RM. Return objects have always
725 been visible within an extended return statement.
726
727 RM References: 8.03 (17)
728
729 .. index:: AI-0042 (Ada 2012 feature)
730
731 * *AI-0042 Overriding versus implemented-by (0000-00-00)*
732
733 This AI fixes a wording gap in the RM. An operation of a synchronized
734 interface can be implemented by a protected or task entry, but the abstract
735 operation is not being overridden in the usual sense, and it must be stated
736 separately that this implementation is legal. This has always been the case
737 in GNAT.
738
739 RM References: 9.01 (9.2/2) 9.04 (11.1/2)
740
741 .. index:: AI-0030 (Ada 2012 feature)
742
743 * *AI-0030 Requeue on synchronized interfaces (2010-07-19)*
744
745 Requeue is permitted to a protected, synchronized or task interface primitive
746 providing it is known that the overriding operation is an entry. Otherwise
747 the requeue statement has the same effect as a procedure call. Use of pragma
748 ``Implemented`` provides a way to impose a static requirement on the
749 overriding operation by adhering to one of the implementation kinds: entry,
750 protected procedure or any of the above.
751
752 RM References: 9.05 (9) 9.05.04 (2) 9.05.04 (3) 9.05.04 (5)
753 9.05.04 (6) 9.05.04 (7) 9.05.04 (12)
754
755 .. index:: AI-0201 (Ada 2012 feature)
756
757 * *AI-0201 Independence of atomic object components (2010-07-22)*
758
759 If an Atomic object has a pragma ``Pack`` or a ``Component_Size``
760 attribute, then individual components may not be addressable by independent
761 tasks. However, if the representation clause has no effect (is confirming),
762 then independence is not compromised. Furthermore, in GNAT, specification of
763 other appropriately addressable component sizes (e.g. 16 for 8-bit
764 characters) also preserves independence. GNAT now gives very clear warnings
765 both for the declaration of such a type, and for any assignment to its components.
766
767 RM References: 9.10 (1/3) C.06 (22/2) C.06 (23/2)
768
769 .. index:: AI-0009 (Ada 2012 feature)
770
771 * *AI-0009 Pragma Independent[_Components] (2010-07-23)*
772
773 This AI introduces the new pragmas ``Independent`` and
774 ``Independent_Components``,
775 which control guaranteeing independence of access to objects and components.
776 The AI also requires independence not unaffected by confirming rep clauses.
777
778 RM References: 9.10 (1) 13.01 (15/1) 13.02 (9) 13.03 (13) C.06 (2)
779 C.06 (4) C.06 (6) C.06 (9) C.06 (13) C.06 (14)
780
781 .. index:: AI-0072 (Ada 2012 feature)
782
783 * *AI-0072 Task signalling using 'Terminated (0000-00-00)*
784
785 This AI clarifies that task signalling for reading ``'Terminated`` only
786 occurs if the result is True. GNAT semantics has always been consistent with
787 this notion of task signalling.
788
789 RM References: 9.10 (6.1/1)
790
791 .. index:: AI-0108 (Ada 2012 feature)
792
793 * *AI-0108 Limited incomplete view and discriminants (0000-00-00)*
794
795 This AI confirms that an incomplete type from a limited view does not have
796 discriminants. This has always been the case in GNAT.
797
798 RM References: 10.01.01 (12.3/2)
799
800 .. index:: AI-0129 (Ada 2012 feature)
801
802 * *AI-0129 Limited views and incomplete types (0000-00-00)*
803
804 This AI clarifies the description of limited views: a limited view of a
805 package includes only one view of a type that has an incomplete declaration
806 and a full declaration (there is no possible ambiguity in a client package).
807 This AI also fixes an omission: a nested package in the private part has no
808 limited view. GNAT always implemented this correctly.
809
810 RM References: 10.01.01 (12.2/2) 10.01.01 (12.3/2)
811
812 .. index:: AI-0077 (Ada 2012 feature)
813
814 * *AI-0077 Limited withs and scope of declarations (0000-00-00)*
815
816 This AI clarifies that a declaration does not include a context clause,
817 and confirms that it is illegal to have a context in which both a limited
818 and a nonlimited view of a package are accessible. Such double visibility
819 was always rejected by GNAT.
820
821 RM References: 10.01.02 (12/2) 10.01.02 (21/2) 10.01.02 (22/2)
822
823 .. index:: AI-0122 (Ada 2012 feature)
824
825 * *AI-0122 Private with and children of generics (0000-00-00)*
826
827 This AI clarifies the visibility of private children of generic units within
828 instantiations of a parent. GNAT has always handled this correctly.
829
830 RM References: 10.01.02 (12/2)
831
832 .. index:: AI-0040 (Ada 2012 feature)
833
834 * *AI-0040 Limited with clauses on descendant (0000-00-00)*
835
836 This AI confirms that a limited with clause in a child unit cannot name
837 an ancestor of the unit. This has always been checked in GNAT.
838
839 RM References: 10.01.02 (20/2)
840
841 .. index:: AI-0132 (Ada 2012 feature)
842
843 * *AI-0132 Placement of library unit pragmas (0000-00-00)*
844
845 This AI fills a gap in the description of library unit pragmas. The pragma
846 clearly must apply to a library unit, even if it does not carry the name
847 of the enclosing unit. GNAT has always enforced the required check.
848
849 RM References: 10.01.05 (7)
850
851 .. index:: AI-0034 (Ada 2012 feature)
852
853 * *AI-0034 Categorization of limited views (0000-00-00)*
854
855 The RM makes certain limited with clauses illegal because of categorization
856 considerations, when the corresponding normal with would be legal. This is
857 not intended, and GNAT has always implemented the recommended behavior.
858
859 RM References: 10.02.01 (11/1) 10.02.01 (17/2)
860
861 .. index:: AI-0035 (Ada 2012 feature)
862
863 * *AI-0035 Inconsistencies with Pure units (0000-00-00)*
864
865 This AI remedies some inconsistencies in the legality rules for Pure units.
866 Derived access types are legal in a pure unit (on the assumption that the
867 rule for a zero storage pool size has been enforced on the ancestor type).
868 The rules are enforced in generic instances and in subunits. GNAT has always
869 implemented the recommended behavior.
870
871 RM References: 10.02.01 (15.1/2) 10.02.01 (15.4/2) 10.02.01 (15.5/2) 10.02.01 (17/2)
872
873 .. index:: AI-0219 (Ada 2012 feature)
874
875 * *AI-0219 Pure permissions and limited parameters (2010-05-25)*
876
877 This AI refines the rules for the cases with limited parameters which do not
878 allow the implementations to omit 'redundant'. GNAT now properly conforms
879 to the requirements of this binding interpretation.
880
881 RM References: 10.02.01 (18/2)
882
883 .. index:: AI-0043 (Ada 2012 feature)
884
885 * *AI-0043 Rules about raising exceptions (0000-00-00)*
886
887 This AI covers various omissions in the RM regarding the raising of
888 exceptions. GNAT has always implemented the intended semantics.
889
890 RM References: 11.04.01 (10.1/2) 11 (2)
891
892 .. index:: AI-0200 (Ada 2012 feature)
893
894 * *AI-0200 Mismatches in formal package declarations (0000-00-00)*
895
896 This AI plugs a gap in the RM which appeared to allow some obviously intended
897 illegal instantiations. GNAT has never allowed these instantiations.
898
899 RM References: 12.07 (16)
900
901 .. index:: AI-0112 (Ada 2012 feature)
902
903 * *AI-0112 Detection of duplicate pragmas (2010-07-24)*
904
905 This AI concerns giving names to various representation aspects, but the
906 practical effect is simply to make the use of duplicate
907 ``Atomic[_Components]``,
908 ``Volatile[_Components]``, and
909 ``Independent[_Components]`` pragmas illegal, and GNAT
910 now performs this required check.
911
912 RM References: 13.01 (8)
913
914 .. index:: AI-0106 (Ada 2012 feature)
915
916 * *AI-0106 No representation pragmas on generic formals (0000-00-00)*
917
918 The RM appeared to allow representation pragmas on generic formal parameters,
919 but this was not intended, and GNAT has never permitted this usage.
920
921 RM References: 13.01 (9.1/1)
922
923 .. index:: AI-0012 (Ada 2012 feature)
924
925 * *AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)*
926
927 It is now illegal to give an inappropriate component size or a pragma
928 ``Pack`` that attempts to change the component size in the case of atomic
929 or aliased components. Previously GNAT ignored such an attempt with a
930 warning.
931
932 RM References: 13.02 (6.1/2) 13.02 (7) C.06 (10) C.06 (11) C.06 (21)
933
934 .. index:: AI-0039 (Ada 2012 feature)
935
936 * *AI-0039 Stream attributes cannot be dynamic (0000-00-00)*
937
938 The RM permitted the use of dynamic expressions (such as ``ptr.all``)`
939 for stream attributes, but these were never useful and are now illegal. GNAT
940 has always regarded such expressions as illegal.
941
942 RM References: 13.03 (4) 13.03 (6) 13.13.02 (38/2)
943
944 .. index:: AI-0095 (Ada 2012 feature)
945
946 * *AI-0095 Address of intrinsic subprograms (0000-00-00)*
947
948 The prefix of ``'Address`` cannot statically denote a subprogram with
949 convention ``Intrinsic``. The use of the ``Address`` attribute raises
950 ``Program_Error`` if the prefix denotes a subprogram with convention
951 ``Intrinsic``.
952
953 RM References: 13.03 (11/1)
954
955 .. index:: AI-0116 (Ada 2012 feature)
956
957 * *AI-0116 Alignment of class-wide objects (0000-00-00)*
958
959 This AI requires that the alignment of a class-wide object be no greater
960 than the alignment of any type in the class. GNAT has always followed this
961 recommendation.
962
963 RM References: 13.03 (29) 13.11 (16)
964
965 .. index:: AI-0146 (Ada 2012 feature)
966
967 * *AI-0146 Type invariants (2009-09-21)*
968
969 Type invariants may be specified for private types using the aspect notation.
970 Aspect ``Type_Invariant`` may be specified for any private type,
971 ``Type_Invariant'Class`` can
972 only be specified for tagged types, and is inherited by any descendent of the
973 tagged types. The invariant is a boolean expression that is tested for being
974 true in the following situations: conversions to the private type, object
975 declarations for the private type that are default initialized, and
976 [**in**] **out**
977 parameters and returned result on return from any primitive operation for
978 the type that is visible to a client.
979 GNAT defines the synonyms ``Invariant`` for ``Type_Invariant`` and
980 ``Invariant'Class`` for ``Type_Invariant'Class``.
981
982 RM References: 13.03.03 (00)
983
984 .. index:: AI-0078 (Ada 2012 feature)
985
986 * *AI-0078 Relax Unchecked_Conversion alignment rules (0000-00-00)*
987
988 In Ada 2012, compilers are required to support unchecked conversion where the
989 target alignment is a multiple of the source alignment. GNAT always supported
990 this case (and indeed all cases of differing alignments, doing copies where
991 required if the alignment was reduced).
992
993 RM References: 13.09 (7)
994
995 .. index:: AI-0195 (Ada 2012 feature)
996
997 * *AI-0195 Invalid value handling is implementation defined (2010-07-03)*
998
999 The handling of invalid values is now designated to be implementation
1000 defined. This is a documentation change only, requiring Annex M in the GNAT
1001 Reference Manual to document this handling.
1002 In GNAT, checks for invalid values are made
1003 only when necessary to avoid erroneous behavior. Operations like assignments
1004 which cannot cause erroneous behavior ignore the possibility of invalid
1005 values and do not do a check. The date given above applies only to the
1006 documentation change, this behavior has always been implemented by GNAT.
1007
1008 RM References: 13.09.01 (10)
1009
1010 .. index:: AI-0193 (Ada 2012 feature)
1011
1012 * *AI-0193 Alignment of allocators (2010-09-16)*
1013
1014 This AI introduces a new attribute ``Max_Alignment_For_Allocation``,
1015 analogous to ``Max_Size_In_Storage_Elements``, but for alignment instead
1016 of size.
1017
1018 RM References: 13.11 (16) 13.11 (21) 13.11.01 (0) 13.11.01 (1)
1019 13.11.01 (2) 13.11.01 (3)
1020
1021 .. index:: AI-0177 (Ada 2012 feature)
1022
1023 * *AI-0177 Parameterized expressions (2010-07-10)*
1024
1025 The new Ada 2012 notion of parameterized expressions is implemented. The form
1026 is:
1027
1028 .. code-block:: ada
1029
1030 function-specification is (expression)
1031
1032 This is exactly equivalent to the
1033 corresponding function body that returns the expression, but it can appear
1034 in a package spec. Note that the expression must be parenthesized.
1035
1036 RM References: 13.11.01 (3/2)
1037
1038 .. index:: AI-0033 (Ada 2012 feature)
1039
1040 * *AI-0033 Attach/Interrupt_Handler in generic (2010-07-24)*
1041
1042 Neither of these two pragmas may appear within a generic template, because
1043 the generic might be instantiated at other than the library level.
1044
1045 RM References: 13.11.02 (16) C.03.01 (7/2) C.03.01 (8/2)
1046
1047 .. index:: AI-0161 (Ada 2012 feature)
1048
1049 * *AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)*
1050
1051 A new restriction ``No_Default_Stream_Attributes`` prevents the use of any
1052 of the default stream attributes for elementary types. If this restriction is
1053 in force, then it is necessary to provide explicit subprograms for any
1054 stream attributes used.
1055
1056 RM References: 13.12.01 (4/2) 13.13.02 (40/2) 13.13.02 (52/2)
1057
1058 .. index:: AI-0194 (Ada 2012 feature)
1059
1060 * *AI-0194 Value of Stream_Size attribute (0000-00-00)*
1061
1062 The ``Stream_Size`` attribute returns the default number of bits in the
1063 stream representation of the given type.
1064 This value is not affected by the presence
1065 of stream subprogram attributes for the type. GNAT has always implemented
1066 this interpretation.
1067
1068 RM References: 13.13.02 (1.2/2)
1069
1070 .. index:: AI-0109 (Ada 2012 feature)
1071
1072 * *AI-0109 Redundant check in S'Class'Input (0000-00-00)*
1073
1074 This AI is an editorial change only. It removes the need for a tag check
1075 that can never fail.
1076
1077 RM References: 13.13.02 (34/2)
1078
1079 .. index:: AI-0007 (Ada 2012 feature)
1080
1081 * *AI-0007 Stream read and private scalar types (0000-00-00)*
1082
1083 The RM as written appeared to limit the possibilities of declaring read
1084 attribute procedures for private scalar types. This limitation was not
1085 intended, and has never been enforced by GNAT.
1086
1087 RM References: 13.13.02 (50/2) 13.13.02 (51/2)
1088
1089 .. index:: AI-0065 (Ada 2012 feature)
1090
1091 * *AI-0065 Remote access types and external streaming (0000-00-00)*
1092
1093 This AI clarifies the fact that all remote access types support external
1094 streaming. This fixes an obvious oversight in the definition of the
1095 language, and GNAT always implemented the intended correct rules.
1096
1097 RM References: 13.13.02 (52/2)
1098
1099 .. index:: AI-0019 (Ada 2012 feature)
1100
1101 * *AI-0019 Freezing of primitives for tagged types (0000-00-00)*
1102
1103 The RM suggests that primitive subprograms of a specific tagged type are
1104 frozen when the tagged type is frozen. This would be an incompatible change
1105 and is not intended. GNAT has never attempted this kind of freezing and its
1106 behavior is consistent with the recommendation of this AI.
1107
1108 RM References: 13.14 (2) 13.14 (3/1) 13.14 (8.1/1) 13.14 (10) 13.14 (14) 13.14 (15.1/2)
1109
1110 .. index:: AI-0017 (Ada 2012 feature)
1111
1112 * *AI-0017 Freezing and incomplete types (0000-00-00)*
1113
1114 So-called 'Taft-amendment types' (i.e., types that are completed in package
1115 bodies) are not frozen by the occurrence of bodies in the
1116 enclosing declarative part. GNAT always implemented this properly.
1117
1118 RM References: 13.14 (3/1)
1119
1120 .. index:: AI-0060 (Ada 2012 feature)
1121
1122 * *AI-0060 Extended definition of remote access types (0000-00-00)*
1123
1124 This AI extends the definition of remote access types to include access
1125 to limited, synchronized, protected or task class-wide interface types.
1126 GNAT already implemented this extension.
1127
1128 RM References: A (4) E.02.02 (9/1) E.02.02 (9.2/1) E.02.02 (14/2) E.02.02 (18)
1129
1130 .. index:: AI-0114 (Ada 2012 feature)
1131
1132 * *AI-0114 Classification of letters (0000-00-00)*
1133
1134 The code points 170 (``FEMININE ORDINAL INDICATOR``),
1135 181 (``MICRO SIGN``), and
1136 186 (``MASCULINE ORDINAL INDICATOR``) are technically considered
1137 lower case letters by Unicode.
1138 However, they are not allowed in identifiers, and they
1139 return ``False`` to ``Ada.Characters.Handling.Is_Letter/Is_Lower``.
1140 This behavior is consistent with that defined in Ada 95.
1141
1142 RM References: A.03.02 (59) A.04.06 (7)
1143
1144 .. index:: AI-0185 (Ada 2012 feature)
1145
1146 * *AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)*
1147
1148 Two new packages ``Ada.Wide_[Wide_]Characters.Handling`` provide
1149 classification functions for ``Wide_Character`` and
1150 ``Wide_Wide_Character``, as well as providing
1151 case folding routines for ``Wide_[Wide_]Character`` and
1152 ``Wide_[Wide_]String``.
1153
1154 RM References: A.03.05 (0) A.03.06 (0)
1155
1156 .. index:: AI-0031 (Ada 2012 feature)
1157
1158 * *AI-0031 Add From parameter to Find_Token (2010-07-25)*
1159
1160 A new version of ``Find_Token`` is added to all relevant string packages,
1161 with an extra parameter ``From``. Instead of starting at the first
1162 character of the string, the search for a matching Token starts at the
1163 character indexed by the value of ``From``.
1164 These procedures are available in all versions of Ada
1165 but if used in versions earlier than Ada 2012 they will generate a warning
1166 that an Ada 2012 subprogram is being used.
1167
1168 RM References: A.04.03 (16) A.04.03 (67) A.04.03 (68/1) A.04.04 (51)
1169 A.04.05 (46)
1170
1171 .. index:: AI-0056 (Ada 2012 feature)
1172
1173 * *AI-0056 Index on null string returns zero (0000-00-00)*
1174
1175 The wording in the Ada 2005 RM implied an incompatible handling of the
1176 ``Index`` functions, resulting in raising an exception instead of
1177 returning zero in some situations.
1178 This was not intended and has been corrected.
1179 GNAT always returned zero, and is thus consistent with this AI.
1180
1181 RM References: A.04.03 (56.2/2) A.04.03 (58.5/2)
1182
1183 .. index:: AI-0137 (Ada 2012 feature)
1184
1185 * *AI-0137 String encoding package (2010-03-25)*
1186
1187 The packages ``Ada.Strings.UTF_Encoding``, together with its child
1188 packages, ``Conversions``, ``Strings``, ``Wide_Strings``,
1189 and ``Wide_Wide_Strings`` have been
1190 implemented. These packages (whose documentation can be found in the spec
1191 files :file:`a-stuten.ads`, :file:`a-suenco.ads`, :file:`a-suenst.ads`,
1192 :file:`a-suewst.ads`, :file:`a-suezst.ads`) allow encoding and decoding of
1193 ``String``, ``Wide_String``, and ``Wide_Wide_String``
1194 values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and
1195 UTF-16), as well as conversions between the different UTF encodings. With
1196 the exception of ``Wide_Wide_Strings``, these packages are available in
1197 Ada 95 and Ada 2005 mode as well as Ada 2012 mode.
1198 The ``Wide_Wide_Strings`` package
1199 is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95
1200 mode since it uses ``Wide_Wide_Character``).
1201
1202 RM References: A.04.11
1203
1204 .. index:: AI-0038 (Ada 2012 feature)
1205
1206 * *AI-0038 Minor errors in Text_IO (0000-00-00)*
1207
1208 These are minor errors in the description on three points. The intent on
1209 all these points has always been clear, and GNAT has always implemented the
1210 correct intended semantics.
1211
1212 RM References: A.10.05 (37) A.10.07 (8/1) A.10.07 (10) A.10.07 (12) A.10.08 (10) A.10.08 (24)
1213
1214 .. index:: AI-0044 (Ada 2012 feature)
1215
1216 * *AI-0044 Restrictions on container instantiations (0000-00-00)*
1217
1218 This AI places restrictions on allowed instantiations of generic containers.
1219 These restrictions are not checked by the compiler, so there is nothing to
1220 change in the implementation. This affects only the RM documentation.
1221
1222 RM References: A.18 (4/2) A.18.02 (231/2) A.18.03 (145/2) A.18.06 (56/2) A.18.08 (66/2) A.18.09 (79/2) A.18.26 (5/2) A.18.26 (9/2)
1223
1224 .. index:: AI-0127 (Ada 2012 feature)
1225
1226 * *AI-0127 Adding Locale Capabilities (2010-09-29)*
1227
1228 This package provides an interface for identifying the current locale.
1229
1230 RM References: A.19 A.19.01 A.19.02 A.19.03 A.19.05 A.19.06
1231 A.19.07 A.19.08 A.19.09 A.19.10 A.19.11 A.19.12 A.19.13
1232
1233 .. index:: AI-0002 (Ada 2012 feature)
1234
1235 * *AI-0002 Export C with unconstrained arrays (0000-00-00)*
1236
1237 The compiler is not required to support exporting an Ada subprogram with
1238 convention C if there are parameters or a return type of an unconstrained
1239 array type (such as ``String``). GNAT allows such declarations but
1240 generates warnings. It is possible, but complicated, to write the
1241 corresponding C code and certainly such code would be specific to GNAT and
1242 non-portable.
1243
1244 RM References: B.01 (17) B.03 (62) B.03 (71.1/2)
1245
1246 .. index:: AI05-0216 (Ada 2012 feature)
1247
1248 * *AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)*
1249
1250 It is clearly the intention that ``No_Task_Hierarchy`` is intended to
1251 forbid tasks declared locally within subprograms, or functions returning task
1252 objects, and that is the implementation that GNAT has always provided.
1253 However the language in the RM was not sufficiently clear on this point.
1254 Thus this is a documentation change in the RM only.
1255
1256 RM References: D.07 (3/3)
1257
1258 .. index:: AI-0211 (Ada 2012 feature)
1259
1260 * *AI-0211 No_Relative_Delays forbids Set_Handler use (2010-07-09)*
1261
1262 The restriction ``No_Relative_Delays`` forbids any calls to the subprogram
1263 ``Ada.Real_Time.Timing_Events.Set_Handler``.
1264
1265 RM References: D.07 (5) D.07 (10/2) D.07 (10.4/2) D.07 (10.7/2)
1266
1267 .. index:: AI-0190 (Ada 2012 feature)
1268
1269 * *AI-0190 pragma Default_Storage_Pool (2010-09-15)*
1270
1271 This AI introduces a new pragma ``Default_Storage_Pool``, which can be
1272 used to control storage pools globally.
1273 In particular, you can force every access
1274 type that is used for allocation (**new**) to have an explicit storage pool,
1275 or you can declare a pool globally to be used for all access types that lack
1276 an explicit one.
1277
1278 RM References: D.07 (8)
1279
1280 .. index:: AI-0189 (Ada 2012 feature)
1281
1282 * *AI-0189 No_Allocators_After_Elaboration (2010-01-23)*
1283
1284 This AI introduces a new restriction ``No_Allocators_After_Elaboration``,
1285 which says that no dynamic allocation will occur once elaboration is
1286 completed.
1287 In general this requires a run-time check, which is not required, and which
1288 GNAT does not attempt. But the static cases of allocators in a task body or
1289 in the body of the main program are detected and flagged at compile or bind
1290 time.
1291
1292 RM References: D.07 (19.1/2) H.04 (23.3/2)
1293
1294 .. index:: AI-0171 (Ada 2012 feature)
1295
1296 * *AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)*
1297
1298 A new package ``System.Multiprocessors`` is added, together with the
1299 definition of pragma ``CPU`` for controlling task affinity. A new no
1300 dependence restriction, on ``System.Multiprocessors.Dispatching_Domains``,
1301 is added to the Ravenscar profile.
1302
1303 RM References: D.13.01 (4/2) D.16
1304
1305 .. index:: AI-0210 (Ada 2012 feature)
1306
1307 * *AI-0210 Correct Timing_Events metric (0000-00-00)*
1308
1309 This is a documentation only issue regarding wording of metric requirements,
1310 that does not affect the implementation of the compiler.
1311
1312 RM References: D.15 (24/2)
1313
1314 .. index:: AI-0206 (Ada 2012 feature)
1315
1316 * *AI-0206 Remote types packages and preelaborate (2010-07-24)*
1317
1318 Remote types packages are now allowed to depend on preelaborated packages.
1319 This was formerly considered illegal.
1320
1321 RM References: E.02.02 (6)
1322
1323 .. index:: AI-0152 (Ada 2012 feature)
1324
1325 * *AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)*
1326
1327 Restriction ``No_Anonymous_Allocators`` prevents the use of allocators
1328 where the type of the returned value is an anonymous access type.
1329
1330 RM References: H.04 (8/1)