annotate gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst @ 111:04ced10e8804

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