Debian Codegraph @

source_2020/obsolescent.mss

raw
1 @Part(obsolescent, Root="ada.mss")
2
3 @Comment{$Date: 2019/04/09 04:56:54 $}
4 @LabeledNormativeAnnex{Obsolescent Features}
5
6 @Comment{$Source: e:\\cvsroot/ARM/Source/obsolescent.mss,v $}
7 @Comment{$Revision: 1.62 $}
8
9 @begin{Intro}
10 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00368-01]}
11 @Redundant[@Defn{obsolescent feature}
12 This Annex contains descriptions of features of the
13 language whose functionality is largely redundant with other features
14 defined by this International Standard.
15 Use of these features is not recommended in newly written programs.
16 @Chg{Version=[2],New=[Use of these features can be prevented by using pragma
17 Restrictions (No_Obsolescent_Features), see
18 @RefSecNum{Language-Defined Restrictions and Profiles}.],
19 Old=[]}]
20 @begin{Ramification}
21 These features are still part of the language,
22 and have to be implemented by conforming implementations.
23 The primary reason for putting these descriptions here
24 is to get redundant features out of the way of most readers.
25 The designers of the next version of Ada@Chg{Version=[2],New=[],
26 Old=[ after Ada 95]} will have to
27 assess whether or not it makes sense to drop these features from the
28 language.
29 @end{Ramification}
30 @end{Intro}
31
32 @begin{DiffWord83}
33 @Leading@;The following features have been removed from the language,
34 rather than declared to be obsolescent:
35 @begin{Itemize}
36 The package Low_Level_IO
37 (see @RefSecNum{Input-Output}).
38
39 The Epsilon, Mantissa, Emax, Small, Large, Safe_Emax, Safe_Small, and
40 Safe_Large attributes of floating point types
41 (see @RefSecNum{Attributes of Floating Point Types}).
42
43 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00284-02]}
44 @ChgDeleted{Version=[2],Text=[The pragma Interface
45 (see @RefSecNum{Interfacing Aspects}).]}
46
47 The pragmas System_Name, Storage_Unit, and Memory_Size
48 (see @RefSecNum{The Package System}).
49
50 The pragma Shared
51 (see @RefSecNum{Shared Variable Control}).
52 @end{Itemize}
53
54 Implementations can continue to support the above features for upward
55 compatibility.
56 @end{DiffWord83}
57
58 @begin{DiffWord95}
59 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00368-01]}
60 @ChgAdded{Version=[2],Text=[A mention of the No_Obsolescent_Features
61 restriction was added.]}
62 @end{DiffWord95}
63
64 @begin{DiffWord2005}
65 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
66 @ChgAdded{Version=[3],Text=[@nt{Pragma} Controlled has been removed from
67 the language, rather than declared to be obsolescent. No existing
68 implementation gives it any effect. An implementation could continue to
69 support the pragma as an implementation-defined pragma for upward
70 compatibility.]}
71 @end{DiffWord2005}
72
73
74 @LabeledRevisedClause{Version=[3],New=[Renamings of Library Units],
75 Old=[Renamings of Ada 83 Library Units]}
76
77 @begin{StaticSem}
78 The following @nt{library_unit_renaming_declaration}s exist:
79 @begin{Example}
80 @key[with] Ada.Unchecked_Conversion;
81 @key[generic] @key[function] Unchecked_Conversion @key[renames] Ada.Unchecked_Conversion;
82
83 @key[with] Ada.Unchecked_Deallocation;
84 @key[generic] @key[procedure] Unchecked_Deallocation @key[renames] Ada.Unchecked_Deallocation;
85
86 @key[with] Ada.Sequential_IO;
87 @key[generic] @key[package] Sequential_IO @key[renames] Ada.Sequential_IO;
88
89 @key[with] Ada.Direct_IO;
90 @key[generic] @key[package] Direct_IO @key[renames] Ada.Direct_IO;
91
92 @key[with] Ada.Text_IO;
93 @key[package] Text_IO @key[renames] Ada.Text_IO;
94
95 @key[with] Ada.IO_Exceptions;
96 @key[package] IO_Exceptions @key[renames] Ada.IO_Exceptions;
97
98 @key[with] Ada.Calendar;
99 @key[package] Calendar @key[renames] Ada.Calendar;
100
101 @key[with] System.Machine_Code;
102 @key[package] Machine_Code @key[renames] System.Machine_Code; --@RI{ If supported.}
103 @end{Example}
104 @begin{Discussion}
105 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0004-1]}
106 @ChgAdded{Version=[3],Text=[These library units correspond to those declared
107 in Ada 83, which did not have the child unit concept or the parent package
108 Ada.]}
109 @end{Discussion}
110 @end{StaticSem}
111
112 @begin{ImplReq}
113 The implementation shall allow the user to replace these renamings.
114 @end{ImplReq}
115
116
117 @LabeledClause{Allowed Replacements of Characters}
118
119 @begin{Syntax}
120 @begin{SyntaxText}
121 @Leading@;The following replacements are allowed for the vertical line, number sign,
122 and quotation mark characters:
123 @begin{Itemize}
124 A vertical line character (|) can be replaced by an exclamation mark
125 (!) where used as a delimiter.
126
127
128 The number sign characters (#) of a @nt{based_literal} can be replaced
129 by colons (:) provided that the replacement is done for both
130 occurrences.
131 @begin{Honest}
132 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
133 The intent is that such a replacement works in the
134 Value@Chg{Version=[2],New=[,],Old=[ and]}
135 Wide_Value@Chg{Version=[2],New=[, and Wide_Wide_Value],Old=[]} attributes,
136 and in the Get procedures of Text_IO@Chg{Version=[2],New=[ (and Wide_Text_IO
137 and Wide_Wide_Text_IO as well)],Old=[]}},
138 so that things like @lquotes@;16:.123:@rquotes@; is acceptable.
139 @end{Honest}
140
141 The quotation marks (") used as string brackets at both ends of
142 a string literal can be replaced by percent signs (%) provided
143 that the enclosed sequence of characters contains no quotation mark, and
144 provided that both string brackets are replaced. Any
145 percent sign within the sequence of characters shall then be
146 doubled and each such doubled percent sign is interpreted as a
147 single percent sign character value.
148 @end{Itemize}
149
150 These replacements do not change the meaning of the program.
151 @begin{Reason}
152 The original purpose of this feature was to support hardware (for
153 example, teletype machines) that has long been obsolete.
154 The feature is no longer necessary for that reason.
155 Another use of the feature has been to replace the vertical line
156 character (|) when using certain hardware that treats that character
157 as a (non-English) letter.
158 The feature is no longer necessary for that reason, either,
159 since Ada 95 has full support for international character sets.
160 Therefore, we believe this feature is no longer necessary.
161
162 Users of equipment that still uses | to represent a letter will
163 continue to do so.
164 Perhaps by next the time Ada is revised,
165 such equipment will no longer be in use.
166
167 @Leading@;Note that it was never legal to use this feature as a convenient
168 method of including double quotes in a string without doubling them
169 @em the string literal:
170 @begin{Example}
171 %"This is quoted."%
172 @end{Example}
173
174 @Leading@ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0248-1]}
175 is not legal in Ada @Chg{Version=[3],New=[(and never was legal)],Old=[83,
176 nor will it be in Ada 95]}. One has to write:
177 @begin{Example}
178 """This is quoted."""
179 @end{Example}
180 @end{Reason}
181 @end{SyntaxText}
182 @end{Syntax}
183
184 @LabeledClause{Reduced Accuracy Subtypes}
185
186 @begin{Intro}
187 A @nt<digits_constraint> may be used to define
188 a floating point subtype with a new
189 value for its requested decimal precision, as reflected
190 by its Digits attribute. Similarly, a @nt<delta_constraint>
191 may be used to define an ordinary fixed point subtype with
192 a new value for its @i(delta), as reflected by its Delta
193 attribute.
194 @begin(Discussion)
195 It might be more direct to make these attributes
196 specifiable via an @nt<attribute_definition_clause>, and eliminate the
197 syntax for these @ntf<_constraint>s.
198 @end(Discussion)
199 @end{Intro}
200
201 @begin{Syntax}
202 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
203 @Syn{lhs=<delta_constraint>,
204 rhs="@key{delta} @SynI{static_}@Chg{Version=[4],New=[@Syn2{simple_expression}],Old=[@Syn2{expression}]} [@Syn2{range_constraint}]"}
205 @end{Syntax}
206
207 @begin{Resolution}
208 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
209 @PDefn2{Term=[expected type], Sec=(delta_constraint expression)}
210 The @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]}
211 of a @nt<delta_constraint> is expected to be of any real type.
212 @end{Resolution}
213
214 @begin{Legality}
215 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
216 The @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]} of a
217 @nt<delta_constraint> shall be static.
218
219 For a @nt<subtype_indication> with a @nt<delta_constraint>, the
220 @nt<subtype_mark> shall denote an ordinary fixed point subtype.
221
222 @Defn{notwithstanding}
223 For a @nt<subtype_indication> with a @nt<digits_constraint>,
224 the @nt<subtype_mark> shall denote either a decimal fixed point subtype
225 or a floating point subtype
226 (notwithstanding the rule given in @RefSecNum(Fixed Point Types)
227 that only allows a decimal fixed point subtype).
228 @begin(Discussion)
229 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00114-01]}
230 @ChgDeleted{Version=[2],Text=[We may need a better way to deal with
231 obsolescent features with rules that contradict those of the nonobsolescent
232 parts of the standard.]}
233 @end(Discussion)
234 @end{Legality}
235
236 @begin{StaticSem}
237 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
238 A @nt<subtype_indication> with a @nt<subtype_mark> that
239 denotes an ordinary fixed point subtype and a @nt<delta_constraint>
240 defines an ordinary fixed point subtype with a @i(delta)
241 given by the value of the @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]} of the
242 @nt<delta_constraint>.
243 If the @nt<delta_constraint> includes a @nt<range_@!constraint>, then
244 the ordinary fixed point subtype is constrained by the @nt<range_@!constraint>.
245
246 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
247 A @nt<subtype_indication> with a @nt<subtype_mark> that
248 denotes a floating point subtype and a @nt<digits_constraint>
249 defines a floating point subtype with a requested decimal precision
250 (as reflected by its Digits attribute)
251 given by the value of the @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]} of the @nt<digits_constraint>.
252 If the @nt<digits_constraint> includes a @nt<range_@!constraint>, then
253 the floating point subtype is constrained by the @nt<range_@!constraint>.
254 @end{StaticSem}
255
256 @begin{RunTime}
257 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
258 @PDefn2{Term=[compatibility],
259 Sec=(delta_constraint with an ordinary fixed point subtype)}
260 A @nt<delta_constraint> is @i(compatible) with an ordinary
261 fixed point subtype if the value of the
262 @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]} is no less
263 than the @i(delta) of the subtype, and the @nt<range_constraint>, if any,
264 is compatible with the subtype.
265
266 @ChgRef{Version=[4],Kind=[Revised],ARef=[AI12-0152-1]}
267 @PDefn2{Term=[compatibility],
268 Sec=(digits_constraint with a floating point subtype)}
269 A @nt<digits_constraint> is @i(compatible) with a
270 floating point subtype if the value of the
271 @Chg{Version=[4],New=[@nt<simple_expression>],Old=[@nt<expression>]} is no greater
272 than the requested decimal precision of the subtype, and
273 the @nt<range_constraint>, if any,
274 is compatible with the subtype.
275
276 @PDefn2{Term=[elaboration], Sec=(delta_constraint)}
277 The elaboration of a @nt<delta_constraint> consists of the
278 elaboration of the @nt<range_constraint>, if any.
279 @begin{Reason}
280 A numeric subtype is considered @lquotes@;constrained@rquotes@; only if a range constraint
281 applies to it. The only effect of a @nt<digits_constraint> or a
282 @nt<delta_constraint> without a @nt<range_constraint> is to specify
283 the value of the corresponding Digits or Delta attribute in
284 the new subtype. The set of values of the subtype is not @lquotes@;constrained@rquotes@;
285 in any way by such @ntf<_constraint>s.
286 @end{Reason}
287 @end{RunTime}
288
289 @begin{DiffWord83}
290 In Ada 83, a @nt<delta_constraint> is called a fixed_point_constraint,
291 and a @nt<digits_constraint> is called a floating_point_constraint.
292 We have adopted other terms because @nt<digits_constraint>s apply
293 primarily to decimal fixed point types now (they apply to
294 floating point types only as an obsolescent feature).
295 @end{DiffWord83}
296
297
298 @begin{Diffword2012}
299 @ChgRef{Version=[4],Kind=[AddedNormal],ARef=[AI12-0152-1]}
300 @ChgAdded{Version=[4],Text=[@b<Corrigendum:>
301 Changed the syntax so that the value following @key[delta] in a
302 @nt<delta_constraint> is a @nt<simple_expression>. This is compatible
303 as any expressions that would require extra parentheses are already
304 illegal. The change is necessary to eliminate
305 syntax ambguities in @nt<derived_type_definition>s. The similar change
306 for @nt<digits_constraint> is documented in @RefSecNum{Fixed Point Types}.]}
307 @end{Diffword2012}
308
309
310 @RMNewPageVer{Version=[2]}@Comment{For printed version of Ada 2005 RM}
311 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
312 @LabeledClause{The Constrained Attribute}
313
314 @begin{StaticSem}
315 @Leading@;For every private subtype S, the following attribute is defined:
316 @begin{Discussion}
317 This includes generic formal private subtypes.
318 @end{Discussion}
319 @begin{Description}
320 S'@attr{Constrained}@\Yields the value False if S denotes an unconstrained
321 nonformal private subtype with discriminants; also yields the
322 value False if S denotes a generic formal private subtype, and
323 the associated actual subtype is either an unconstrained subtype
324 with discriminants or an unconstrained array subtype; yields
325 the value True otherwise. The value of this attribute is of
326 the predefined subtype Boolean.
327 @begin{Reason}
328 Because Ada 95 has @nt{unknown_discriminant_part}s,
329 the Constrained attribute of private subtypes is obsolete.
330 This is fortunate, since its Ada 83 definition was confusing,
331 as explained below. Because this attribute is obsolete,
332 we do not bother to extend its definition to private extensions.
333
334 The Constrained attribute of an object is @i(not) obsolete.
335
336 Note well: S'Constrained matches the Ada 95 definition of @lquotes@;constrained@rquotes@;
337 only for composite subtypes. For elementary subtypes,
338 S'Constrained is always true, whether or not S is constrained.
339 (The Constrained attribute of an object does not have this problem,
340 as it is only defined for objects of a discriminated type.)
341 So one should think of its designator as being 'Constrained_Or_Elementary.
342 @end{Reason}
343 @end{Description}
344 @end{StaticSem}
345
346 @LabeledClause{ASCII}
347
348 @begin{StaticSem}
349 @Leading@;The following declaration exists in the declaration of package
350 Standard:
351 @begin{example}
352 @key[package] ASCII @key[is]
353
354
355 --@RI{ Control characters:}
356
357
358 @tabclear()@tabset(P47)
359 NUL : @key[constant] Character := @RI{nul}; @\SOH : @key[constant] Character := @RI{soh};
360 STX : @key[constant] Character := @RI{stx}; @\ETX : @key[constant] Character := @RI{etx};
361 EOT : @key[constant] Character := @RI{eot}; @\ENQ : @key[constant] Character := @RI{enq};
362 ACK : @key[constant] Character := @RI{ack}; @\BEL : @key[constant] Character := @RI{bel};
363 BS : @key[constant] Character := @RI{bs}; @\HT : @key[constant] Character := @RI{ht};
364 LF : @key[constant] Character := @RI{lf}; @\VT : @key[constant] Character := @RI{vt};
365 FF : @key[constant] Character := @RI{ff}; @\CR : @key[constant] Character := @RI{cr};
366 SO : @key[constant] Character := @RI{so}; @\SI : @key[constant] Character := @RI{si};
367 DLE : @key[constant] Character := @RI{dle}; @\DC1 : @key[constant] Character := @RI{dc1};
368 DC2 : @key[constant] Character := @RI{dc2}; @\DC3 : @key[constant] Character := @RI{dc3};
369 DC4 : @key[constant] Character := @RI{dc4}; @\NAK : @key[constant] Character := @RI{nak};
370 SYN : @key[constant] Character := @RI{syn}; @\ETB : @key[constant] Character := @RI{etb};
371 CAN : @key[constant] Character := @RI{can}; @\EM : @key[constant] Character := @RI{em};
372 SUB : @key[constant] Character := @RI{sub}; @\ESC : @key[constant] Character := @RI{esc};
373 FS : @key[constant] Character := @RI{fs}; @\GS : @key[constant] Character := @RI{gs};
374 RS : @key[constant] Character := @RI{rs}; @\US : @key[constant] Character := @RI{us};
375 DEL : @key[constant] Character := @RI{del};
376
377
378 --@RI{ Other characters:}
379
380 Exclam : @key[constant] Character:= '!';@\Quotation : @key[constant] Character:= '"';
381 Sharp : @key[constant] Character:= '#';@\Dollar : @key[constant] Character:= '$';
382 Percent : @key[constant] Character:= '%';@\Ampersand : @key[constant] Character:= '&';
383 Colon : @key[constant] Character:= ':';@\Semicolon : @key[constant] Character:= ';';
384 Query : @key[constant] Character:= '?';@\At_Sign : @key[constant] Character:= '@@';
385 L_Bracket: @key[constant] Character:= '[';@\Back_Slash: @key[constant] Character:= '\';
386 R_Bracket: @key[constant] Character:= ']';@\Circumflex: @key[constant] Character:= '^';
387 Underline: @key[constant] Character:= '_';@\Grave : @key[constant] Character:= '`';
388 L_Brace : @key[constant] Character:= '{';@\Bar : @key[constant] Character:= '|';
389 R_Brace : @key[constant] Character:= '}';@\Tilde : @key[constant] Character:= '~';
390
391 --@RI{ Lower case letters:}
392
393
394 LC_A: @key[constant] Character:= 'a';
395 ...
396 LC_Z: @key[constant] Character:= 'z';
397
398
399 @key[end] ASCII;
400 @end{example}
401 @end{StaticSem}
402
403
404 @LabeledClause{Numeric_Error}
405
406 @begin{StaticSem}
407 @Leading@;The following declaration exists in the declaration
408 of package Standard:
409 @begin{Example}
410 Numeric_Error : @key[exception] @key[renames] Constraint_Error;
411 @end{Example}
412 @begin{Discussion}
413 This is true even though it is not shown in
414 @RefSecNum{The Package Standard}.
415 @end{Discussion}
416 @begin{Reason}
417 In Ada 83, it was unclear which situations should raise
418 Numeric_Error, and which should raise Constraint_Error.
419 The permissions of RM83-11.6 could often be used to allow
420 the implementation to raise Constraint_Error in a situation
421 where one would normally expect Numeric_Error.
422 To avoid this confusion, all situations that raise Numeric_Error in
423 Ada 83 are changed to raise Constraint_Error in Ada 95.
424 Numeric_Error is changed to be a renaming of Constraint_Error
425 to avoid most of the upward compatibilities associated with
426 this change.
427
428 In new code, Constraint_Error should be used instead of Numeric_Error.
429 @end{Reason}
430 @end{StaticSem}
431
432 @LabeledClause{At Clauses}
433
434 @begin{Syntax}
435 @Syn{lhs=<at_clause>,rhs="@key{for} @Syn2{direct_name} @key{use} @key{at} @Syn2{expression};"}
436 @end{Syntax}
437
438 @begin{StaticSem}
439 An @nt{at_clause} of the form @lquotes@;for @i{x} use at @i{y};@rquotes@; is
440 equivalent to an @nt{attribute_definition_clause} of the form
441 @lquotes@;for @i{x}'Address use @i{y};@rquotes@;.
442 @begin{Reason}
443 The preferred syntax for specifying the address of an entity is an
444 @nt{attribute_definition_clause} specifying the Address attribute.
445 Therefore, the special-purpose @nt{at_clause} syntax is now obsolete.
446
447 The above equivalence implies, for example, that only one @nt{at_clause}
448 is allowed for a given entity.
449 Similarly, it is illegal to give both
450 an @nt{at_clause}
451 and an @nt{attribute_definition_clause} specifying the Address attribute.
452 @end{Reason}
453 @end{StaticSem}
454
455 @begin{Extend83}
456 @Defn{extensions to Ada 83}
457 We now allow to define the address of an entity using an
458 @nt{attribute_definition_clause}.
459 This is because Ada 83's @nt{at_clause} is so hard to
460 remember: programmers often tend to write @lquotes@;for X'Address use...;@rquotes@;.
461 @end{Extend83}
462
463 @begin{DiffWord83}
464 Ada 83's @ntf{address_clause} is now called an @nt{at_clause} to avoid
465 confusion with the new term @lquotes@;Address clause@rquotes@; (that is, an
466 @nt{attribute_definition_clause} for the Address attribute).
467 @end{DiffWord83}
468
469 @LabeledSubClause{Interrupt Entries}
470
471 @begin{Intro}
472 @redundant[Implementations are permitted to allow the attachment of task entries to
473 interrupts via the address clause. Such an entry is referred to as an
474 @i{interrupt entry}.
475
476 The address of the task entry corresponds to a hardware interrupt in an
477 implementation-defined manner. (See Ada.Interrupts.Reference in
478 @RefSecNum{The Package Interrupts}.)]
479 @end{Intro}
480
481 @begin{StaticSem}
482 @Leading@;The following attribute is defined:
483
484 @Leading@;For any task entry X:
485 @begin{Description}
486 @Defn{interrupt entry}
487 X'@attr{Address} @\For a task entry whose address is specified
488 (an @i{interrupt entry}), the value
489 refers to the corresponding hardware interrupt. For such
490 an entry, as for any other task entry, the meaning of this
491 value is implementation defined. The value of this attribute
492 is of the type of the subtype System.Address.
493
494 @NoPrefix@;@PDefn2{Term=[specifiable], Sec=(of Address for entries)}
495 Address may be specified for single entries
496 via an @nt{attribute_definition_clause}.
497 @begin{Reason}
498 Because of the equivalence of @nt{at_clause}s and
499 @nt{attribute_definition_clause}s, an interrupt entry may be
500 specified via either notation.
501 @end{Reason}
502 @end{Description}
503 @end{StaticSem}
504
505 @begin{RunTime}
506
507 @PDefn2{Term=[initialization], Sec=[of a task object]}
508 As part of the initialization of a task object, the
509 address clause for an interrupt entry is
510 elaborated@Redundant[, which evaluates the
511 @nt<expression> of the address clause].
512 A check is made that the address specified is
513 associated with some interrupt to which a task entry may be attached.
514 @Defn2{Term=[Program_Error],Sec=(raised by failure of runtime check)}
515 If this check fails, Program_Error is raised.
516 Otherwise, the interrupt entry
517 is attached to the interrupt associated with the specified address.
518
519 @PDefn2{Term=[finalization], Sec=[of a task object]}
520 Upon finalization of the task object, the interrupt entry, if any, is
521 detached from the corresponding interrupt and the default treatment is
522 restored.
523
524 While an interrupt entry is attached to an interrupt,
525 the interrupt is reserved (see @RefSecNum{Interrupt Support}).
526
527 An interrupt delivered to a task entry acts as a call to the entry issued by
528 a hardware task whose priority is in the System.Interrupt_Priority range.
529 It is implementation defined whether the call is performed as
530 an ordinary entry call, a timed entry
531 call, or a conditional entry call; which kind of call is performed
532 can depend on the specific interrupt.
533
534 @end{RunTime}
535
536 @begin{Bounded}
537 @PDefn2{Term=(bounded error),Sec=(cause)}
538 It is a bounded error to evaluate
539 E'Caller (see @RefSecNum(The Package Task_Identification))
540 in an @nt{accept_statement} for an interrupt
541 entry. The possible effects are
542 the same as for calling Current_Task from an entry body.
543 @end{Bounded}
544
545 @begin{DocReq}
546
547 The implementation shall document to which interrupts a
548 task entry may be attached.
549 @ChgDocReq{Version=[2],Kind=[AddedNormal],Text=[@ChgAdded{Version=[2],
550 Text=[The interrupts to which a task entry may be attached.]}]}
551
552 The implementation shall document whether the invocation of an interrupt entry
553 has the effect of an ordinary entry call, conditional call, or a timed call,
554 and whether the effect varies in the presence of pending interrupts.
555 @ChgDocReq{Version=[2],Kind=[AddedNormal],Text=[@ChgAdded{Version=[2],
556 Text=[The type of entry call invoked for an interrupt entry.]}]}
557
558 @end{DocReq}
559
560 @begin{ImplPerm}
561 The support for this subclause is optional.
562
563 Interrupts to which the implementation allows a task entry to be
564 attached may be designated as reserved for the entire duration
565 of program execution@Redundant[; that is, not just when they have an
566 interrupt entry attached to them].
567
568 @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0077],ARef=[AI95-00111-01]}
569 Interrupt entry calls may be implemented by having the hardware execute
570 directly the appropriate @Chg{New=[@nt{accept_statement}],Old=[accept body]}.
571 Alternatively, the implementation is allowed to provide an internal interrupt
572 handler to simulate the effect of a normal task calling the entry.
573
574 The implementation is allowed to impose restrictions on the specifications
575 and bodies of tasks that have interrupt entries.
576
577 It is implementation defined whether direct calls (from the program) to
578 interrupt entries are allowed.
579
580 If a @nt{select_statement} contains both a @nt{terminate_alternative} and an
581 @nt{accept_alternative} for an interrupt entry, then an implementation is
582 allowed to impose further requirements for the selection of the
583 @nt{terminate_alternative} in addition to those given in
584 @RefSecNum{Task Dependence - Termination of Tasks}.
585 @end{ImplPerm}
586
587 @begin{Notes}
588 @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0077],ARef=[AI95-00111-01]}
589 Queued interrupts correspond to ordinary entry calls. Interrupts that are
590 lost if not immediately processed correspond to conditional entry calls. It
591 is a consequence of the priority rules that an @Chg{New=[@nt{accept_statement}],
592 Old=[accept body]} executed in response to an interrupt can be executed with
593 the active priority at which the hardware generates the interrupt, taking
594 precedence over lower priority tasks, without a scheduling action.
595
596 Control information that is supplied upon an interrupt can be passed to an
597 associated interrupt entry as one or more parameters of mode @key[in].
598 @end{Notes}
599
600 @begin{Examples}
601 @leading@keepnext@i{Example of an interrupt entry:}
602 @begin{example}
603 @key[task] Interrupt_Handler @key[is]
604 @key[entry] Done;
605 @key[for] Done'Address @key[use] Ada.Interrupts.Reference(Ada.Interrupts.Names.Device_Done);
606 @key[end] Interrupt_Handler;
607
608 @end{example}
609 @end{Examples}
610
611 @begin{DiffWord83}
612
613 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00114-01]}
614 RM83-13.5.1 did not adequately address the problems
615 @Chg{Version=[2],New=[associated],Old=[associate]} with
616 interrupts. This feature is now obsolescent and is replaced by the Ada 95
617 interrupt model as specified in the Systems Programming Annex.
618 @end{DiffWord83}
619
620 @begin{DiffWord95}
621 @ChgRef{Version=[2],Kind=[AddedNormal],Ref=[8652/0077],ARef=[AI95-00111-01]}
622 @Chg{Version=[2],New=[@b<Corrigendum:> The undefined term @i{accept body}
623 was replaced by @nt{accept_statement}.], Old=[]}
624 @end{DiffWord95}
625
626 @RMNewPageVer{Version=[2]}@Comment{For printed version of Ada 2005 RM}
627 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
628 @LabeledClause{Mod Clauses}
629
630 @begin{Syntax}
631 @Syn{lhs=<mod_clause>,rhs="@key{at} @key{mod} @SynI{static_}@Syn2{expression};"}
632 @end{Syntax}
633
634 @begin{StaticSem}
635 @leading@keepnext@;A @nt{record_representation_clause} of the form:
636 @begin{example}
637 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0092-1]}
638 @key[for] @RI{r} @key[use]
639 @key[record] @key[at] @key[mod] @RI{a}@Chg{Version=[3],New=[;],Old=[]}
640 ...
641 @key[end] @key[record];
642 @end{example}
643
644 @leading@keepnext@;is equivalent to:
645 @begin{example}
646 @key[for] @RI{r}'Alignment @key[use] @RI{a};
647 @key[for] @RI{r} @key[use]
648 @key[record]
649 ...
650 @key[end] @key[record];
651 @end{example}
652 @begin{Reason}
653 The preferred syntax for specifying the alignment of an entity is an
654 @nt{attribute_definition_clause} specifying the Alignment attribute.
655 Therefore, the special-purpose @nt{mod_clause} syntax is now
656 obsolete.
657
658 The above equivalence implies, for example, that it is illegal to give both
659 a @nt{mod_clause}
660 and an @nt{attribute_definition_clause} specifying the Alignment attribute
661 for the same type.
662 @end{Reason}
663 @end{StaticSem}
664
665 @begin{DiffWord83}
666 Ada 83's @ntf{alignment_clause} is now called a @nt{mod_clause} to avoid
667 confusion with the new term @lquotes@;Alignment clause@rquotes@; (that is, an
668 @nt{attribute_definition_clause} for the Alignment attribute).
669 @end{DiffWord83}
670
671 @LabeledClause{The Storage_Size Attribute}
672
673 @begin{StaticSem}
674 @Leading@;For any task subtype T, the following attribute is defined:
675 @begin{Description}
676 T'@attr{Storage_Size} @\Denotes an implementation-defined value
677 of type @i{universal_integer}
678 representing the number of storage
679 elements reserved for a task of the subtype T.
680 @begin{Honest}
681 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
682 T'Storage_Size cannot be particularly meaningful in the presence of
683 @Chg{Version=[3],New=[the specification of the aspect],Old=[a @nt{pragma}]}
684 Storage_Size, especially when the expression is dynamic, or
685 depends on a discriminant of the task,
686 because the Storage_Size will be different for different objects of the type.
687 Even without such a @Chg{Version=[3],New=[specification],Old=[@nt{pragma}]},
688 the Storage_Size can be different for different objects of the type,
689 and in any case, the value is implementation defined.
690 Hence, it is always implementation defined.
691 @end{Honest}
692
693 @NoPrefix@ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00345-01]}
694 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
695 @PDefn2{Term=[specifiable], Sec=(of Storage_Size for a task
696 first subtype)}
697 @NoPrefix@;Storage_Size may be specified for a task first subtype
698 @Chg{Version=[2],New=[that is not an interface ],Old=[]}via
699 an @nt{attribute_definition_clause}.@Chg{Version=[3],New=[
700 When the attribute is specified, the Storage_Size aspect
701 is specified to be the value of the given @nt{expression}.],Old=[]}
702 @end{Description}
703
704 @begin{Ramification}
705 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
706 @ChgAdded{Version=[3],Text=[When this attribute is specified with an
707 @nt{attribute_definition_clause}, the associated aspect is set to the
708 @i<value> of the @nt{expression} given in the @nt{attribute_definition_clause},
709 rather than the @nt{expression} itself.
710 This value is therefore the same for all objects of the type; in particular,
711 it is not re-evaluated when objects are created. This is different than
712 when the aspect is specified with an @nt{aspect_specification}
713 (see @RefSecNum{Operational and Representation Attributes}).]}
714 @end{Ramification}
715
716 @end{StaticSem}
717
718 @begin{DiffWord95}
719 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00345-01]}
720 @ChgAdded{Version=[2],Text=[We don't allow specifying Storage_Size on
721 task interfaces. We don't need to mention class-wide task types, because
722 these cannot be a first subtype.]}
723 @end{DiffWord95}
724
725 @LabeledAddedClause{Version=[2],Name=[Specific Suppression of Checks]}
726
727 @begin{Intro}
728 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
729 @ChgAdded{Version=[2],Text=[Pragma Suppress can be used to suppress checks on
730 specific entities.]}
731 @end{Intro}
732
733 @begin{Syntax}
734 @begin{SyntaxText}
735 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
736 @ChgAdded{Version=[2],KeepNext=[T],Type=[Leading],Text=[The form of a specific
737 Suppress @nt{pragma} is as follows:]}
738 @end{SyntaxText}
739
740 @ChgRef{Version=[2],Kind=[AddedNormal]}
741 @Chg{Version=[2],
742 New=`@ @ @key{pragma} @prag{Suppress}(@Syn2{identifier}, [On =>] @Syn2{name});',
743 Old=<>}
744 @end{Syntax}
745
746 @begin{Legality}
747 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
748 @ChgAdded{Version=[2],Text=[The @nt{identifier} shall be the name of a check
749 (see @RefSecNum{Suppressing Checks}). The @nt{name} shall
750 statically denote some entity.]}
751
752 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
753 @ChgAdded{Version=[2],Text=[For a specific Suppress @nt{pragma} that is
754 immediately within a @nt{package_specification}, the @nt{name} shall denote an
755 entity (or several overloaded subprograms) declared immediately within the
756 @nt{package_@!specification}.]}
757 @end{Legality}
758
759 @begin{StaticSem}
760 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
761 @ChgAdded{Version=[2],Text=[A specific Suppress @nt{pragma} applies to the
762 named check from the place of the @nt{pragma} to the end of the innermost
763 enclosing declarative region, or, if the @nt{pragma} is given in a
764 @nt{package_specification}, to the end of the scope of the named entity. The
765 @nt{pragma} applies only to the named entity, or, for a subtype, on objects and
766 values of its type. A specific Suppress @nt{pragma} suppresses the named check
767 for any entities to which it applies (see @RefSecNum{Suppressing Checks}).
768 Which checks are associated with a specific entity is not defined by this
769 International Standard.]}
770
771 @ChgRef{Version=[2],Kind=[AddedNormal]}
772 @begin{Discussion}
773 @ChgAdded{Version=[2],Text=[The language doesn't specify exactly which entities
774 control whether a check is performed. For example, in]}
775 @begin{Example}
776 @Chg{Version=[2],New=[@key{pragma} Suppress (Range_Check, On => A);
777 A := B;],Old=[]}
778 @end{Example}
779 @ChgAdded{Version=[2],Text=[whether or not the range check is performed is not
780 specified. The compiler may require that checks are suppressed on B or on the
781 type of A in order to omit the range check.]}
782 @end{Discussion}
783 @end{StaticSem}
784
785 @begin{ImplPerm}
786 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
787 @ChgAdded{Version=[2],Text=[An implementation is allowed to place restrictions on
788 specific Suppress @nt{pragma}s.]}
789 @end{ImplPerm}
790
791 @begin{Notes}
792 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
793 @ChgAdded{Version=[2],Text=[An implementation may support a similar On parameter on
794 @nt{pragma} Unsuppress (see @RefSecNum{Suppressing Checks}).]}
795 @end{Notes}
796
797 @begin{DiffWord95}
798 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00224-01]}
799 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
800 @ChgAdded{Version=[2],Text=[This @Chg{Version=[3],New=[subclause],Old=[clause]}
801 is new. This feature was moved here
802 because it is important for pragma Unsuppress that there be an unambiguous
803 meaning for each checking pragma. For instance, in the example]}
804 @begin{Example}
805 @ChgAdded{Version=[2],Text=[@key{pragma} Suppress (Range_Check);
806 @key{pragma} Unsuppress (Range_Check, On => A);
807 A := B;]}
808 @end{Example}
809 @ChgAdded{Version=[2],Text=[the user needs to be able to depend on the range check
810 being made on the assignment. But a compiler survey showed that the
811 interpretation of this feature varied widely; trying to define this carefully
812 was likely to cause a lot of user and implementer pain. Thus the feature was
813 moved here, to emphasize that its use is not portable.]}
814 @end{DiffWord95}
815
816
817 @LabeledAddedClause{Version=[2],Name=[The Class Attribute of Untagged Incomplete Types]}
818
819
820 @begin{StaticSem}
821 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00326-01]}
822 @ChgAdded{Version=[2],Type=[Leading],Text=[For the first subtype S of a type
823 @i<T> declared by an @nt<incomplete_type_declaration> that is not tagged, the
824 following attribute is defined:]}
825 @begin{Description}
826 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00326-01]}
827 @Chg{Version=[2],New=[S'@attr{Class} @\Denotes the first subtype of the
828 incomplete class-wide type rooted at @i<T>. The completion of @i<T> shall
829 declare a tagged type. Such an attribute reference shall occur in the same
830 library unit as the @nt<incomplete_type_declaration>.],Old=[]}
831 @end{Description}
832 @begin{Reason}
833 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00326-01]}
834 @ChgAdded{Version=[2],Text=[This must occur in the same unit to prevent
835 children from imposing requirements on their ancestor library
836 units for deferred incomplete types.]}
837 @end{reason}
838 @end{StaticSem}
839
840 @begin{DiffWord95}
841 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00326-01]}
842 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
843 @ChgAdded{Version=[2],Text=[This @Chg{Version=[3],New=[subclause],Old=[clause]}
844 is new. This feature was moved here
845 because the tagged incomplete type provides a better way to provide this
846 capability (it doesn't put requirements on the completion based on uses that
847 could be anywhere). Pity we didn't think of it in 1994.]}
848 @end{DiffWord95}
849
850
851 @LabeledAddedClause{Version=[2],Name=[Pragma Interface]}
852
853 @begin{Syntax}
854 @begin{SyntaxText}
855 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00284-02]}
856 @ChgAdded{Version=[2],Text=[In addition to an identifier, the reserved word
857 @key{interface} is allowed as a pragma name, to provide compatibility with a prior
858 edition of this International Standard.]}
859 @end{SyntaxText}
860 @end{Syntax}
861
862 @begin{ImplNote}
863 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00284-02]}
864 @ChgAdded{Version=[2],Text=[All implementations need to at least recognize and
865 ignore this pragma. A syntax error is not an acceptable implementation of
866 this pragma.]}
867 @end{ImplNote}
868
869 @begin{DiffWord95}
870 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00326-01]}
871 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
872 @ChgAdded{Version=[2],Text=[This @Chg{Version=[3],New=[subclause],Old=[clause]}
873 is new. This is necessary as @key{interface}
874 is now a reserved word, which would prevent pragma Interface from being an
875 implementation-defined pragma. We don't define any semantics for this
876 pragma, as we expect that implementations will continue to use whatever they
877 currently implement - requiring any changes would be counter-productive.]}
878 @end{DiffWord95}
879
880
881 @LabeledAddedClause{Version=[2],Name=[Dependence Restriction Identifiers]}
882
883 @begin{Intro}
884 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
885 @ChgAdded{Version=[2],Text=[The following restrictions involve dependence
886 on specific language-defined units. The more general restriction No_Dependence
887 (see @RefSecNum{Language-Defined Restrictions and Profiles}) should be
888 used for this purpose.]}
889 @end{Intro}
890
891
892 @begin{StaticSem}
893
894 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
895 @ChgAdded{Version=[2],Type=[Leading],
896 Text=[The following @Syni<restriction_>@nt<identifier>s exist:]}
897
898 @begin{Description}
899
900 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
901 @ChgAdded{Version=[2],Text=[@Defn2{Term=[Restrictions],
902 Sec=(No_Asynchronous_Control)}No_Asynchronous_Control @\Semantic dependence
903 on the predefined package Asynchronous_Task_Control is not allowed.]}
904
905 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
906 @ChgAdded{Version=[2],Text=[@Defn2{Term=[Restrictions],
907 Sec=(No_Unchecked_Conversion)}No_Unchecked_Conversion @\Semantic
908 dependence on the predefined generic function Unchecked_Conversion is not
909 allowed.]}
910
911 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
912 @ChgAdded{Version=[2],Text=[@Defn2{Term=[Restrictions],
913 Sec=(No_Unchecked_Deallocation)}No_Unchecked_Deallocation @\Semantic
914 dependence on the predefined generic procedure Unchecked_Deallocation is
915 not allowed.]}
916
917 @end{Description}
918 @end{StaticSem}
919
920 @begin{DiffWord95}
921 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
922 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
923 @ChgAdded{Version=[2],Text=[This @Chg{Version=[3],New=[subclause],Old=[clause]}
924 is new. These restrictions
925 are replaced by the more general No_Dependence
926 (see @RefSecNum{Language-Defined Restrictions and Profiles}).]}
927 @end{DiffWord95}
928
929 @RMNewPageVer{Version=[2]}@Comment{For printed version of Ada 2005 RM}
930 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
931 @LabeledAddedClause{Version=[2],Name=[Character and Wide_Character Conversion Functions]}
932
933 @begin{StaticSem}
934
935 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00395-01]}
936 @ChgAdded{Version=[2],Type=[Leading],
937 Text=[The following declarations exist in the declaration of package
938 Ada.Characters.Handling:]}
939
940 @begin{Example}
941 @ChgRef{Version=[2],Kind=[AddedNormal]}
942 @ChgAdded{Version=[2],Text=[ @key{function} Is_Character (Item : @key{in} Wide_Character) @key{return} Boolean
943 @key{renames} Conversions.Is_Character;
944 @key{function} Is_String (Item : @key{in} Wide_String) @key{return} Boolean
945 @key{renames} Conversions.Is_String;]}
946
947 @ChgRef{Version=[2],Kind=[AddedNormal]}
948 @ChgAdded{Version=[2],Text=[ @key{function} To_Character (Item : @key{in} Wide_Character;
949 Substitute : @key{in} Character := ' ')
950 @key{return} Character
951 @key{renames} Conversions.To_Character;]}
952
953 @ChgRef{Version=[2],Kind=[AddedNormal]}
954 @ChgAdded{Version=[2],Text=[ @key{function} To_String (Item : @key{in} Wide_String;
955 Substitute : @key{in} Character := ' ')
956 @key{return} String
957 @key{renames} Conversions.To_String;]}
958
959 @ChgRef{Version=[2],Kind=[AddedNormal]}
960 @ChgAdded{Version=[2],Text=[ @key{function} To_Wide_Character (Item : @key{in} Character) @key{return} Wide_Character
961 @key{renames} Conversions.To_Wide_Character;]}
962
963 @ChgRef{Version=[2],Kind=[AddedNormal]}
964 @ChgAdded{Version=[2],Text=[ @key{function} To_Wide_String (Item : @key{in} String) @key{return} Wide_String
965 @key{renames} Conversions.To_Wide_String;]}
966 @end{Example}
967 @end{StaticSem}
968
969 @begin{DiffWord95}
970 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00394-01]}
971 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
972 @ChgAdded{Version=[2],Text=[This @Chg{Version=[3],New=[subclause],Old=[clause]}
973 is new. These subprograms were moved to Characters.Conversions
974 (see @RefSecNum{The Package Characters.Conversions}).]}
975 @end{DiffWord95}
976
977 @LabeledAddedClause{Version=[3],Name=[Aspect-related Pragmas]}
978
979 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
980 @ChgAdded{Version=[3],Text=[Pragmas can be used as an alternative to
981 aspect_specifications to specify certain aspects.]}
982
983 @begin{DiffWord2005}
984 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
985 @ChgAdded{Version=[3],Text=[This subclause is new. Many existing pragmas have
986 been converted into aspects; the pragmas have moved here.]}
987 @end{DiffWord2005}
988
989 @LabeledAddedSubClause{Version=[3],Name=[Pragma Inline]}
990
991 @begin{Syntax}
992 @begin{SyntaxText}
993 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
994 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
995 Inline, which is a program unit pragma (see @RefSecNum{Pragmas and Program Units}),
996 is as follows:@PDefn2{Term=[program unit pragma], Sec=(Inline)}
997 @PDefn2{Term=[pragma, program unit], Sec=(Inline)}]}
998 @end{SyntaxText}
999
1000 @ChgRef{Version=[3],Kind=[AddedNormal]}
1001 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1002 Text=[@key{pragma} @prag<Inline> (@Syn2[name]{, @Syn2[name]});]}>
1003 @end{Syntax}
1004
1005 @begin{Legality}
1006 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1007 @ChgAdded{Version=[3],Text=[The @nt{pragma} shall apply to one or more
1008 callable entities or generic subprograms.]}
1009 @end{Legality}
1010
1011 @begin{StaticSem}
1012 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1013 @ChgAdded{Version=[3],Text=[@nt{Pragma} Inline specifies that the Inline aspect
1014 (see @RefSecNum{Inline Expansion of Subprograms}) for each
1015 entity denoted by each @nt{name} given in the @nt{pragma} has the value True.]}
1016
1017 @begin{Ramification}
1018 @ChgRef{Version=[3],Kind=[AddedNormal]}
1019 @ChgAdded{Version=[3],Type=[Leading],Text=[Note that inline expansion is
1020 desired no matter what @nt{name} is used in the call. This allows one to request
1021 inlining for only one of several overloaded subprograms as follows:]}
1022
1023 @begin{Example}
1024 @ChgRef{Version=[3],Kind=[AddedNormal]}
1025 @ChgAdded{Version=[3],Text=[@key[package] IO @key[is]
1026 @key[procedure] Put(X : @key[in] Integer);
1027 @key[procedure] Put(X : @key[in] String);
1028 @key[procedure] Put(X : @key[in] Character);
1029 @key[private]
1030 @key[procedure] Character_Put(X : @key[in] Character) @key[renames] Put;
1031 @key[pragma] Inline(Character_Put);
1032 @key[end] IO;]}
1033
1034 @ChgRef{Version=[3],Kind=[AddedNormal]}
1035 @ChgAdded{Version=[3],Text=[@key[with] IO; @key[use] IO;
1036 @key[procedure] Main @key[is]
1037 I : Integer;
1038 C : Character;
1039 @key[begin]
1040 ...
1041 Put(C); --@Examcom{ Inline expansion is desired.}
1042 Put(I); --@Examcom{ Inline expansion is NOT desired.}
1043 @key[end] Main;]}
1044 @end{Example}
1045 @end{Ramification}
1046 @end{StaticSem}
1047
1048 @begin{ImplPerm}
1049 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1050 @ChgAdded{Version=[3],Text=[An implementation may allow a @nt{pragma} Inline
1051 that has an argument which is a @nt{direct_name} denoting a
1052 @nt{subprogram_body} of the same @nt{declarative_part}.]}
1053
1054 @begin{Reason}
1055 @ChgRef{Version=[3],Kind=[AddedNormal]}
1056 @ChgAdded{Version=[3],Text=[This is allowed for Ada 83 compatibility. This is
1057 only a permission as this usage was considered obsolescent even for Ada 95.]}
1058 @end{Reason}
1059
1060 @begin{Discussion}
1061 @ChgRef{Version=[3],Kind=[AddedNormal]}
1062 @ChgAdded{Version=[3],Text=[We only need to allow this in @nt{declarative_part}s,
1063 because a @nt{body} is only allowed in another @nt{body}, and these all have
1064 @nt{declarative_part}s.]}
1065 @end{Discussion}
1066 @end{ImplPerm}
1067
1068 @begin{Notes}
1069 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1070 @ChgAdded{Version=[3],Text=[The name in a @nt{pragma} Inline may denote more
1071 than one entity in the case of overloading. Such a @nt{pragma} applies to
1072 all of the denoted entities.]}
1073 @end{Notes}
1074
1075 @begin{Incompatible83}
1076 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI95-00309-01],ARef=[AI05-0229-1]}
1077 @ChgAdded{Version=[3],Text=[@Defn{incompatibilities with Ada 83}
1078 A pragma Inline cannot refer to a @nt{subprogram_body} outside of that
1079 body. The pragma can be given inside of the subprogram body. Ada 2005
1080 adds an @ImplPermName to allow this usage for compatibility (and
1081 Ada 95 implementations also can use this permission), but
1082 implementations do not have to allow such @nt{pragma}s.]}
1083 @end{Incompatible83}
1084
1085 @begin{Extend83}
1086 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1087 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 83}
1088 A @nt{pragma} Inline is allowed inside a @nt{subprogram_body} if there
1089 is no corresponding @nt{subprogram_declaration}.
1090 This is for uniformity with other program unit pragmas.]}
1091 @end{Extend83}
1092
1093 @begin{Extend95}
1094 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI95-00309-01],ARef=[AI05-0229-1]}
1095 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 95}
1096 @b[Amendment Correction:] Implementations are allowed to let @nt{Pragma}
1097 Inline apply to a @nt{subprogram_body}.]}
1098 @end{Extend95}
1099
1100 @begin{DiffWord2005}
1101 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1102 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Inline was moved
1103 here from @RefSecNum{Inline Expansion of Subprograms}; aspect Inline lives
1104 there now.]}
1105 @end{DiffWord2005}
1106
1107
1108 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
1109 @LabeledAddedSubClause{Version=[3],Name=[Pragma No_Return]}
1110
1111 @begin{Syntax}
1112 @begin{SyntaxText}
1113 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1114 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1115 No_Return, which is a representation pragma
1116 (see @RefSecNum{Operational and Representation Aspects}),
1117 is as follows:@PDefn2{Term=[representation pragma], Sec=(No_Return)}
1118 @PDefn2{Term=[pragma, representation], Sec=(No_Return)}]}
1119 @end{SyntaxText}
1120
1121 @ChgRef{Version=[3],Kind=[AddedNormal]}
1122 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0269-1]}
1123 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1124 Text=[@key{pragma} @prag<No_Return> (@Chg{Version=[5],New=[@SynI[subprogram_]@Syn2[local_name]],Old=[@SynI[procedure_]@Syn2[local_name]]}{, @Chg{Version=[5],New=[@SynI[subprogram_]@Syn2[local_name]],Old=[@SynI[procedure_]@Syn2[local_name]]});]}>
1125 @end{Syntax}
1126
1127 @begin{Legality}
1128 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1129 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0269-1]}
1130 @ChgAdded{Version=[3],Text=[Each @Chg{Version=[5],New=[@SynI[subprogram_]@nt{local_name}],Old=[@SynI[procedure_]@nt{local_name}]}
1131 shall denote one or more @Chg{Version=[5],New=[subprograms],Old=[procedures]}
1132 or generic @Chg{Version=[5],New=[subprograms],Old=[procedures]}.
1133 @Redundant[The @Chg{Version=[5],New=[@SynI[subprogram_]@nt{local_name}],Old=[@SynI[procedure_]@nt{local_name}]} shall not denote a null
1134 procedure nor an instance of a generic unit.]]}
1135 @end{Legality}
1136
1137 @begin{StaticSem}
1138 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1139 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0269-1]}
1140 @ChgAdded{Version=[3],Text=[@nt{Pragma} No_Return specifies that the No_Return
1141 aspect (see @RefSecNum{Nonreturning Subprograms}) for each
1142 @Chg{Version=[5],New=[subprogram],Old=[procedure]} denoted
1143 by each @nt{local_name} given in the @nt{pragma} has the value True.]}
1144 @end{StaticSem}
1145
1146 @begin{DiffWord2005}
1147 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1148 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma No_Return was moved
1149 here from @RefSecNum{Nonreturning Subprograms}; aspect No_Return lives
1150 there now.]}
1151 @end{DiffWord2005}
1152
1153 @begin{DiffWord2012}
1154 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0269-1]}
1155 @ChgAdded{Version=[5],Text=[This subclause is new. Pragma No_Return was moved
1156 here from @RefSecNum{Nonreturning Subprograms}; aspect No_Return lives
1157 there now.]}
1158 @end{DiffWord2012}
1159
1160
1161 @LabeledAddedSubClause{Version=[3],Name=[Pragma Pack]}
1162
1163 @begin{Syntax}
1164 @begin{SyntaxText}
1165 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1166 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1167 Pack, which is a representation pragma
1168 (see @RefSecNum{Operational and Representation Aspects}),
1169 is as follows:@PDefn2{Term=[representation pragma], Sec=(Pack)}
1170 @PDefn2{Term=[pragma, representation], Sec=(Pack)}]}
1171 @end{SyntaxText}
1172
1173 @ChgRef{Version=[3],Kind=[AddedNormal]}
1174 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1175 Text=[@key{pragma} @prag<Pack> (@SynI[first_subtype_]@Syn2[local_name]);]}>
1176 @end{Syntax}
1177
1178
1179 @begin{Legality}
1180 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1181 @ChgAdded{Version=[3],Text=[The @SynI<first_subtype_>@nt{local_name} of a
1182 @nt{pragma} Pack shall denote a composite subtype.]}
1183 @end{Legality}
1184
1185 @begin{StaticSem}
1186 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1187 @ChgAdded{Version=[3],Text=[@nt{Pragma}
1188 Pack specifies that the Pack aspect (see @RefSecNum{Packed Types}) for the type
1189 denoted by @SynI<first_subtype_>@nt{local_name} has the value True.]}
1190 @end{StaticSem}
1191
1192 @begin{DiffWord2005}
1193 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1194 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Pack was moved
1195 here from @RefSecNum{Packed Types}; aspect Pack lives
1196 there now.]}
1197 @end{DiffWord2005}
1198
1199
1200 @LabeledAddedSubClause{Version=[3],Name=[Pragma Storage_Size]}
1201
1202 @begin{Syntax}
1203 @begin{SyntaxText}
1204 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1205 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1206 Storage_Size is as follows:]}
1207 @end{SyntaxText}
1208
1209 @ChgRef{Version=[3],Kind=[AddedNormal]}
1210 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1211 Text=[@key{pragma} @prag<Storage_Size> (@Syn2[expression]);]}>
1212
1213 @begin{SyntaxText}
1214 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1215 @ChgAdded{Version=[3],Text=[A @nt{pragma} Storage_Size is allowed only
1216 immediately within a @nt{task_definition}.]}
1217 @end{SyntaxText}
1218 @end{Syntax}
1219
1220 @begin{Resolution}
1221 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1222 @ChgAdded{Version=[3],Text=[The @nt{expression} of a @nt{pragma} Storage_Size
1223 is expected to be of any integer type.@PDefn2{Term=[expected type], Sec=(Storage_Size pragma argument)}]}
1224 @end{Resolution}
1225
1226 @begin{StaticSem}
1227 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1228 @ChgAdded{Version=[3],Text=[The @nt{pragma} Storage_Size sets the
1229 Storage_Size aspect (see @RefSecNum{Operational and Representation Attributes})
1230 of the type defined by the immediately enclosing @nt{task_definition}
1231 to the value of the @nt{expression} of the @nt{pragma}.]}
1232 @end{StaticSem}
1233
1234 @begin{DiffWord2005}
1235 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1236 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Storage_Size was moved
1237 here from @RefSecNum{Operational and Representation Attributes};
1238 aspect Storage_Size lives there now.]}
1239 @end{DiffWord2005}
1240
1241
1242 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
1243 @LabeledAddedSubClause{Version=[3],Name=[Interfacing Pragmas]}
1244
1245 @begin{Syntax}
1246 @begin{SyntaxText}
1247 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1248 @ChgAdded{Version=[3],Type=[Leading],Text=[@RootDefn{interfacing pragma}
1249 @PDefn2{Term=[interfacing pragma], Sec=(Import)}
1250 @PDefn2{Term=[pragma, interfacing], Sec=(Import)}
1251 @PDefn2{Term=[interfacing pragma], Sec=(Export)}
1252 @PDefn2{Term=[pragma, interfacing], Sec=(Export)}
1253 @PDefn2{Term=[interfacing pragma], Sec=(Convention)}
1254 @PDefn2{Term=[pragma, interfacing], Sec=(Convention)}
1255 @PDefn2{Term=[representation pragma], Sec=(Import)}
1256 @PDefn2{Term=[pragma, representation], Sec=(Import)}
1257 @PDefn2{Term=[representation pragma], Sec=(Export)}
1258 @PDefn2{Term=[pragma, representation], Sec=(Export)}
1259 @PDefn2{Term=[representation pragma], Sec=(Convention)}
1260 @PDefn2{Term=[pragma, representation], Sec=(Convention)}
1261 An @i{interfacing pragma} is a representation pragma that is
1262 one of the @nt{pragma}s Import, Export,
1263 or Convention. Their forms are as follows:]}
1264 @end{SyntaxText}
1265 @ChgRef{Version=[3],Kind=[AddedNormal]}
1266 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1267 Text=`@key{pragma} @prag(Import)(@*
1268 @ @ @ @ @ [Convention =>] @SynI{convention_}@Syn2{identifier}, [Entity =>] @Syn2{local_name}@*
1269 @ @ [, [External_Name =>] @SynI{external_name_string_}@Syn2{expression}]@*
1270 @ @ [, [Link_Name =>] @SynI{link_name_string_}@Syn2{expression}]);'}>
1271
1272 @ChgRef{Version=[3],Kind=[AddedNormal]}
1273 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1274 Text=`@key{pragma} @prag(Export)(@*
1275 @ @ @ @ @ [Convention =>] @SynI{convention_}@Syn2{identifier}, [Entity =>] @Syn2{local_name}@*
1276 @ @ [, [External_Name =>] @SynI{external_name_string_}@Syn2{expression}]@*
1277 @ @ [, [Link_Name =>] @SynI{link_name_string_}@Syn2{expression}]);'}>
1278
1279 @ChgRef{Version=[3],Kind=[AddedNormal]}
1280 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1281 Text=`@key{pragma} @prag(Convention)([Convention =>] @SynI{convention_}@Syn2{identifier},[Entity =>] @Syn2{local_name});'}>
1282
1283 @begin{SyntaxText}
1284 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1285 @ChgAdded{Version=[3],Text=[For @nt{pragma}s Import and Export, the argument
1286 for Link_Name shall not be given without the
1287 @i{pragma_@!argument_}@!@nt{identifier}
1288 unless the argument for External_Name is given.]}
1289 @end{SyntaxText}
1290 @end{Syntax}
1291
1292
1293 @begin{Resolution}
1294 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1295 @ChgAdded{Version=[3],Text=[@PDefn2{Term=[expected type],Sec=(link name)}
1296 @PDefn2{Term=[expected type],Sec=(external name)} The expected type for an
1297 @SynI{external_name_string_}@nt{expression} and a
1298 @SynI{link_name_string_}@nt{expression} in an interfacing pragma is String.]}
1299 @end{Resolution}
1300
1301 @begin{Legality}
1302 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1303 @ChgAdded{Version=[3],Text=[The @SynI{convention_}@nt{identifier} of an
1304 interfacing pragma shall be the name of a convention
1305 (see @RefSecNum{Interfacing Aspects}).]}
1306
1307 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1308 @ChgAdded{Version=[3],Text=[A @nt{pragma} Import shall be the completion of a
1309 declaration. @PDefn{Notwithstanding}Notwithstanding any rule to the
1310 contrary, a @nt{pragma} Import may serve as the completion of any kind of
1311 (explicit) declaration if supported by an implementation for that kind of
1312 declaration. If a completion is a @nt{pragma} Import, then it shall appear in
1313 the same @nt{declarative_part}, @nt{package_specification},
1314 @nt{task_definition}, or @nt{protected_definition} as the declaration. For a
1315 library unit, it shall appear in the same @nt{compilation}, before any
1316 subsequent @nt{compilation_unit}s other than @nt{pragma}s. If the
1317 @nt{local_name} denotes more than one entity, then the @nt{pragma} Import is the
1318 completion of all of them.]}
1319
1320 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1321 @ChgAdded{Version=[3],Text=[The @SynI{external_name_string_}@nt{expression} and
1322 @SynI{link_name_string_}@nt{expression} of a @nt{pragma} Import or Export shall
1323 be static.]}
1324
1325 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1326 @ChgAdded{Version=[3],Text=[The @nt{local_name} of each of these pragmas
1327 shall denote a declaration that may have the similarly named aspect specified.]}
1328 @end{Legality}
1329
1330 @begin{StaticSem}
1331 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1332 @ChgAdded{Version=[3],Type=[Leading],Text=[An interfacing pragma specifies
1333 various aspects of the entity denoted by the @nt{local_name} as follows:]}
1334 @begin{Itemize}
1335 @ChgRef{Version=[3],Kind=[AddedNormal]}
1336 @ChgAdded{Version=[3],Text=[The Convention aspect (see
1337 @RefSecNum{Interfacing Aspects}) is @SynI{convention_}@nt{identifier}.]}
1338
1339 @ChgRef{Version=[3],Kind=[AddedNormal]}
1340 @ChgAdded{Version=[3],Text=[A @nt{pragma} Import specifies that the Import
1341 aspect (see @RefSecNum{Interfacing Aspects}) is True.]}
1342
1343 @ChgRef{Version=[3],Kind=[AddedNormal]}
1344 @ChgAdded{Version=[3],Text=[A @nt{pragma} Export specifies that the Export
1345 aspect (see @RefSecNum{Interfacing Aspects}) is True.]}
1346
1347 @ChgRef{Version=[3],Kind=[AddedNormal]}
1348 @ChgAdded{Version=[3],Text=[For both @nt{pragma} Import and Export, if an external
1349 name is given in the pragma, the External_Name aspect (see
1350 @RefSecNum{Interfacing Aspects}) is specified to be
1351 @SynI{external_name_string_}@nt{expression}. If a link name is given in the
1352 pragma, the Link_Name aspect (see @RefSecNum{Interfacing Aspects}) is
1353 specified to be the @SynI{link_name_string_}@nt{expression}.]}
1354 @end{Itemize}
1355 @end{StaticSem}
1356
1357 @begin{DiffWord2005}
1358 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1359 @ChgAdded{Version=[3],Text=[This subclause is new. Pragmas Import, Export, and
1360 Convention were moved here from @RefSecNum{Interfacing Aspects}; aspects
1361 Import, Export, Convention, Link_Name, and External_Name live there now.]}
1362 @end{DiffWord2005}
1363
1364
1365 @LabeledAddedSubClause{Version=[3],Name=[Pragma Unchecked_Union]}
1366
1367 @begin{Syntax}
1368 @begin{SyntaxText}
1369 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1370 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1371 Unchecked_Union, which is a representation pragma
1372 (see @RefSecNum{Operational and Representation Aspects}),
1373 is as follows:@PDefn2{Term=[representation pragma], Sec=(Unchecked_Union)}
1374 @PDefn2{Term=[pragma, representation], Sec=(Unchecked_Union)}]}
1375 @end{SyntaxText}
1376
1377 @ChgRef{Version=[3],Kind=[AddedNormal]}
1378 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1379 Text=[@key{pragma} @prag<Unchecked_Union> (@SynI[first_subtype_]@Syn2[local_name]);]}>
1380 @end{Syntax}
1381
1382 @begin{Legality}
1383 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1384 @ChgAdded{Version=[3],Text=[The @SynI<first_subtype_>@nt{local_name} of a
1385 @nt{pragma} Unchecked_Union shall denote an
1386 unconstrained discriminated record subtype having a @nt{variant_part}.]}
1387 @end{Legality}
1388
1389 @begin{StaticSem}
1390 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1391 @ChgAdded{Version=[3],Text=[A @nt{pragma} Unchecked_Union specifies that
1392 the Unchecked_Union aspect (see @RefSecNum{Unchecked Union Types})
1393 for the type denoted by @SynI<first_subtype_>@nt{local_name} has the value
1394 True.]}
1395 @end{StaticSem}
1396
1397 @begin{DiffWord2005}
1398 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1399 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Unchecked_Union was
1400 moved here from @RefSecNum{Unchecked Union Types}; aspect Unchecked_Union
1401 lives there now.]}
1402 @end{DiffWord2005}
1403
1404
1405 @LabeledAddedSubClause{Version=[3],Name=[Pragmas Interrupt_Handler and Attach_Handler]}
1406
1407 @begin{Syntax}
1408 @begin{SyntaxText}
1409 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1410 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1411 Interrupt_Handler is as follows:]}
1412 @end{SyntaxText}
1413
1414 @ChgRef{Version=[3],Kind=[AddedNormal]}
1415 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1416 Text=[@key{pragma} @prag<Interrupt_Handler> (@SynI[handler_]@Syn2[name]);]}>
1417
1418 @begin{SyntaxText}
1419 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1420 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1421 Attach_Handler is as follows:]}
1422 @end{SyntaxText}
1423
1424 @ChgRef{Version=[3],Kind=[AddedNormal]}
1425 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1426 Text=[@key{pragma} @prag<Attach_Handler> (@SynI[handler_]@Syn2[name], @Syn2[expression]);]}>
1427 @end{Syntax}
1428
1429 @begin{Resolution}
1430 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1431 @ChgAdded{Version=[3],Text=[For the Interrupt_Handler and Attach_Handler
1432 pragmas, the @SynI[handler_]@nt{name} shall resolve to denote a protected
1433 procedure with a parameterless profile.]}
1434
1435 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1436 @ChgAdded{Version=[3],Text=[For the Attach_Handler pragma, the expected type for
1437 the expression is Interrupts.Interrupt_Id (see @RefSecNum{The Package Interrupts}).
1438 @PDefn2{Term=[expected type], Sec=(Attach_Handler pragma second argument)}]}
1439 @end{Resolution}
1440
1441 @begin{Legality}
1442 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0033-1],ARef=[AI05-0229-1]}
1443 @ChgAdded{Version=[3],Text=[The Attach_Handler and Interrupt_Handler pragmas
1444 are only allowed immediately within the @nt{protected_definition} where the corresponding subprogram is declared.
1445 The corresponding @nt{protected_type_declaration} or @nt{single_protected_declaration}
1446 shall be a library-level declaration, and shall not be declared within a generic
1447 body.
1448 @PDefn{generic contract issue}
1449 In addition to the places where Legality Rules normally apply (see
1450 @RefSecNum{Generic Instantiation}), these rules also apply in the private part
1451 of an instance of a generic unit.]}
1452 @begin{Discussion}
1453 @ChgRef{Version=[3],Kind=[AddedNormal]}
1454 @ChgAdded{Version=[3],Text=[In the case of a @nt{protected_type_declaration},
1455 an @nt{object_declaration} of an object of that type
1456 need not be at library level.]}
1457
1458 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0033-1]}
1459 @ChgAdded{Version=[3],Text=[We cannot allow these pragmas in a generic body,
1460 because legality rules are not checked for instance bodies, and these should
1461 not be allowed if the instance is not at the library level. The protected types
1462 can be declared in the private part if this is desired. Note that while the
1463 'Access to use the handler would provide the check in the case of
1464 Interrupt_Handler, there is no other check for Attach_Handler. Since these
1465 pragmas are so similar, we want the rules to be the same.]}
1466 @end{Discussion}
1467
1468 @end{Legality}
1469
1470 @begin{StaticSem}
1471 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1472 @ChgAdded{Version=[3],Text=[For an implementation that supports Annex C, a
1473 pragma Interrupt_Handler specifies the Interrupt_Handler aspect (see
1474 @RefSecNum{Protected Procedure Handlers}) for
1475 the protected procedure @SynI<handler_>@nt{name} to have the value True. For an
1476 implementation that supports Annex C, a pragma Attach_Handler specifies the
1477 Attach_Handler aspect (see @RefSecNum{Protected Procedure Handlers}) for
1478 the protected procedure @SynI{handler_}@nt{name} to
1479 have the value of the given @nt{expression}@Redundant[ as evaluated at object
1480 creation time].]}
1481 @end{StaticSem}
1482
1483 @begin{Incompatible2005}
1484 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0033-1]}
1485 @ChgAdded{Version=[3],Text=[@Defn{incompatibilities with Ada 2005}@b<Correction:>
1486 Added missing generic contract wording for the pragma Attach_Handler and
1487 Interrupt_Handler. This means that nested instances with these pragmas in the
1488 private part are now illegal. This is not likely to occur in practice.]}
1489 @end{Incompatible2005}
1490
1491 @begin{DiffWord2005}
1492 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1493 @ChgAdded{Version=[3],Text=[This subclause is new. Pragmas Interrupt_Handler
1494 and Attach_Handler were moved here from @RefSecNum{Protected Procedure Handlers};
1495 aspects Interrupt_Handler and Attach_Handler live there now.]}
1496 @end{DiffWord2005}
1497
1498
1499 @NotISORMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
1500 @LabeledAddedSubClause{Version=[3],Name=[Shared Variable Pragmas]}
1501
1502 @begin{Syntax}
1503 @begin{SyntaxText}
1504 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1505 @ChgAdded{Version=[3],Type=[Leading],Text=[The form for @nt{pragma}s
1506 Atomic, Volatile, Independent, Atomic_Components, and
1507 Volatile_Components, and Independent_Components is as follows:]}
1508 @end{SyntaxText}
1509
1510 @ChgRef{Version=[3],Kind=[AddedNormal]}
1511 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1512 Text=[@key{pragma} @prag<Atomic> (@Syn2[local_name]);]}>
1513
1514 @ChgRef{Version=[3],Kind=[AddedNormal]}
1515 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1516 Text=[@key{pragma} @prag<Volatile> (@Syn2[local_name]);]}>
1517
1518 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1]}
1519 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1520 Text=[@key{pragma} @prag<Independent> (@SynI[component_]@Syn2[local_name]);]}>
1521
1522 @ChgRef{Version=[3],Kind=[AddedNormal]}
1523 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1524 Text=[@key{pragma} @prag<Atomic_Components> (@SynI[array_]@Syn2[local_name]);]}>
1525
1526 @ChgRef{Version=[3],Kind=[AddedNormal]}
1527 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1528 Text=[@key{pragma} @prag<Volatile_Components> (@SynI[array_]@Syn2[local_name]);]}>
1529
1530 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1]}
1531 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1532 Text=[@key{pragma} @prag<Independent_Components> (@Syn2[local_name]);]}>
1533
1534 @begin{Discussion}
1535 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1],ARef=[AI05-0229-1]}
1536 @ChgAdded{Version=[3],Text=[Pragmas Independent and Independent_Components
1537 are born obsolescent; they are defined to provide consistency with the existing
1538 shared variable pragmas. As with all obsolescent
1539 features, these pragmas are not optional; all Ada implementations need to
1540 implement them. Also note that these pragmas were defined as a @b<Correction>;
1541 as such, they are expected to be implemented as part of Ada 2005
1542 implementations (and they would not be obsolescent there).]}
1543 @end{Discussion}
1544
1545 @end{Syntax}
1546
1547 @begin{Resolution}
1548 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1],ARef=[AI05-0229-1]}
1549 @ChgAdded{Version=[3],Text=[The @nt{local_name} in an Atomic or Volatile pragma
1550 shall resolve to denote either an @nt{object_declaration}, a noninherited
1551 @nt{component_declaration}, or a @nt{full_type_declaration}. The
1552 @SynI{component_}@nt{local_name} in an Independent pragma shall resolve to
1553 denote a noninherited @nt{component_declaration}. The @SynI{array_}@nt{local_name}
1554 in an Atomic_Components or Volatile_Components pragma shall resolve to denote
1555 the declaration of an array type or an array object of an anonymous type. The
1556 @nt{local_name} in an Independent_Components pragma shall resolve to denote the
1557 declaration of an array or record type or an array object of an anonymous
1558 type.]}
1559 @end{Resolution}
1560
1561 @begin{StaticSem}
1562 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1563 @ChgAdded{Version=[3],Text=[These @nt{pragma}s are representation pragmas
1564 (see @RefSecNum{Operational and Representation Aspects}).
1565 Each of these @nt{pragma}s specifies that the similarly named aspect
1566 (see @RefSecNum{Shared Variable Control}) of the
1567 type, object, or component denoted by its argument is True.
1568 @PDefn2{Term=[representation pragma], Sec=(Atomic)}
1569 @PDefn2{Term=[pragma, representation], Sec=(Atomic)}
1570 @PDefn2{Term=[representation pragma], Sec=(Volatile)}
1571 @PDefn2{Term=[pragma, representation], Sec=(Volatile)}
1572 @PDefn2{Term=[representation pragma], Sec=(Atomic_Components)}
1573 @PDefn2{Term=[pragma, representation], Sec=(Atomic_Components)}
1574 @PDefn2{Term=[representation pragma], Sec=(Volatile_Components)}
1575 @PDefn2{Term=[pragma, representation], Sec=(Volatile_Components)}
1576 @PDefn2{Term=[representation pragma], Sec=(Independent)}
1577 @PDefn2{Term=[pragma, representation], Sec=(Independent)}
1578 @PDefn2{Term=[representation pragma], Sec=(Independent_Components)}
1579 @PDefn2{Term=[pragma, representation], Sec=(Independent_Components)}]}
1580 @end{StaticSem}
1581
1582 @begin{Legality}
1583 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1584 @ChgAdded{Version=[3],Text=[The @nt{local_name} of each of these @nt{pragma}s
1585 shall denote a declaration that may have the similarly named aspect specified.]}
1586 @end{Legality}
1587
1588 @begin{DiffWord2005}
1589 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1590 @ChgAdded{Version=[3],Text=[This subclause is new. These pragmas
1591 were moved here from @RefSecNum{Shared Variable Control};
1592 various aspects live there now.]}
1593 @end{DiffWord2005}
1594
1595
1596 @LabeledAddedSubClause{Version=[3],Name=[Pragma CPU]}
1597
1598 @begin{Discussion}
1599 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1600 @ChgAdded{Version=[3],Text=[This pragma is born obsolescent; it is defined to
1601 provide consistency with existing real-time pragmas. As with all obsolescent
1602 features, this pragma is not optional; all Ada implementations need to
1603 implement it.]}
1604 @end{Discussion}
1605
1606 @begin{Syntax}
1607 @begin{SyntaxText}
1608 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1609 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1610 CPU is as follows:]}
1611 @end{SyntaxText}
1612
1613 @ChgRef{Version=[3],Kind=[AddedNormal]}
1614 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1615 Text=[@key{pragma} @prag<CPU> (@Syn2[expression]);]}>
1616
1617 @end{Syntax}
1618
1619 @begin{Resolution}
1620 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1621 @ChgAdded{Version=[3],Text=[The expected type for the @nt{expression} of a
1622 @nt{pragma} CPU is
1623 System.Multiprocessors.CPU_Range.@PDefn2{Term=[expected type], Sec=(CPU pragma argument)}]}
1624 @end{Resolution}
1625
1626 @begin{Legality}
1627 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1628 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0281-1]}
1629 @ChgAdded{Version=[3],Text=[A CPU pragma is allowed only immediately within a
1630 @nt{task_definition}, @Chg{Version=[5],New=[@nt{protected_definition},
1631 ],Old=[]}or the @nt{declarative_part} of a @nt{subprogram_body}.]}
1632
1633 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1634 @ChgAdded{Version=[3],Text=[For a CPU pragma that appears in the
1635 @nt{declarative_part} of a @nt{subprogram_body}, the @nt{expression} shall be
1636 static.]}
1637 @end{Legality}
1638
1639 @begin{StaticSem}
1640 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1641 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0281-1]}
1642 @ChgAdded{Version=[3],Text=[For an implementation that supports Annex D, a
1643 @nt{pragma} CPU specifies the value of the CPU aspect (see
1644 @RefSecNum{Multiprocessor Implementation}). If the @nt{pragma} appears in a
1645 @nt{task_definition}, the @nt{expression} is associated with the aspect for the
1646 task type or @nt{single_task_declaration} that contains the
1647 @nt{pragma}@Chg{Version=[5],New=[. If the pragma appears in
1648 a @nt{protected_definition}, the @nt{expression} is associated with the
1649 aspect for the protected type or @nt{single_protected_declaration} that contains
1650 the @nt{pragma}. Otherwise],Old=[; otherwise]}, the @nt{expression} is
1651 associated with the aspect for the subprogram that contains the @nt{pragma}.]}
1652 @end{StaticSem}
1653
1654 @begin{Extend2005}
1655 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1]}
1656 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 2005}Pragma
1657 CPU is new.]}
1658 @end{Extend2005}
1659
1660
1661 @LabeledAddedSubClause{Version=[3],Name=[Pragma Dispatching_Domain]}
1662
1663 @begin{Discussion}
1664 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0167-1]}
1665 @ChgAdded{Version=[3],Text=[This pragma is born obsolescent; it is defined to
1666 provide consistency with existing real-time pragmas. As with all obsolescent
1667 features, this pragma is not optional; all Ada implementations need to
1668 implement it.]}
1669 @end{Discussion}
1670
1671 @begin{Syntax}
1672
1673 @begin{SyntaxText}
1674 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0167-1]}
1675 @ChgAdded{Version=[3],Type=[Leading],Keepnext=[T],Text=[The form of a
1676 @nt{pragma} Dispatching_Domain is as follows:]}
1677 @end{SyntaxText}
1678
1679 @ChgRef{Version=[3],Kind=[AddedNormal]}
1680 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1681 Text=[@key{pragma} @prag<Dispatching_Domain> (@nt{expression});]}>
1682
1683 @end{Syntax}
1684
1685 @begin{Resolution}
1686 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0167-1]}
1687 @ChgAdded{Version=[3],Text=[The expected type for the @nt{expression} is
1688 System.Multiprocessors.Dispatching_Domains.Dispatching_Domain.
1689 @PDefn2{Term=[expected type], Sec=(Dispatching_Domains pragma argument)}]}
1690 @end{Resolution}
1691
1692 @begin{Legality}
1693 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0167-1]}
1694 @ChgAdded{Version=[3],Text=[A Dispatching_Domain pragma is allowed only
1695 immediately within a @nt{task_definition}.]}
1696 @end{Legality}
1697
1698 @begin{StaticSem}
1699 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0167-1]}
1700 @ChgAdded{Version=[3],Text=[For an implementation that supports Annex D, a
1701 pragma Dispatching_Domain specifies the value of the Dispatching_Domain aspect
1702 (see @RefSecNum{Multiprocessor Dispatching Domains}). The @nt{expression} is
1703 associated with the aspect for the task type or @nt{single_task_declaration}
1704 that contains the pragma.]}
1705 @end{StaticSem}
1706
1707 @begin{Extend2005}
1708 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0009-1]}
1709 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 2005}Pragma
1710 Dispatching_Domain is new.]}
1711 @end{Extend2005}
1712
1713
1714 @LabeledAddedSubClause{Version=[3],Name=[Pragmas Priority and Interrupt_Priority]}
1715
1716 @begin{Syntax}
1717
1718 @begin{SyntaxText}
1719 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1720 @ChgAdded{Version=[3],Type=[Leading],Keepnext=[T],Text=[The form of a
1721 @nt{pragma} Priority is as follows:]}
1722 @end{SyntaxText}
1723
1724 @ChgRef{Version=[3],Kind=[AddedNormal]}
1725 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1726 Text=[@key{pragma} @prag<Priority> (@nt{expression});]}>
1727
1728 @begin{SyntaxText}
1729 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1730 @ChgAdded{Version=[3],Type=[Leading],Keepnext=[T],Text=[The form of a
1731 @nt{pragma} Interrupt_Priority is as follows:]}
1732 @end{SyntaxText}
1733
1734 @ChgRef{Version=[3],Kind=[AddedNormal]}
1735 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1736 Text=[@key{pragma} @prag<Interrupt_Priority> [(@nt{expression})];]}>
1737
1738 @end{Syntax}
1739
1740 @begin{Resolution}
1741 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1742 @ChgAdded{Version=[3],Text=[The expected type for the @nt{expression}
1743 in a Priority or Interrupt_Priority pragma is
1744 Integer.@PDefn2{Term=[expected type], Sec=(Priority pragma argument)}
1745 @PDefn2{Term=[expected type], Sec=(Interrupt_Priority pragma argument)}]}
1746 @end{Resolution}
1747
1748 @begin{Legality}
1749 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1750 @ChgAdded{Version=[3],Text=[A Priority pragma is allowed only immediately
1751 within a @nt{task_definition}, a @nt{protected_definition}, or the
1752 @nt{declarative_part} of a @nt{subprogram_body}. An Interrupt_Priority pragma is
1753 allowed only immediately within a @nt{task_definition} or a
1754 @nt{protected_definition}.]}
1755
1756 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1757 @ChgAdded{Version=[3],Text=[For a Priority pragma that appears in the
1758 @nt{declarative_part} of a @nt{subprogram_body},
1759 the @nt{expression} shall be static, and its value shall be in the range of
1760 System.Priority.]}
1761 @end{Legality}
1762
1763 @begin{StaticSem}
1764
1765 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1766 @ChgAdded{Version=[3],Type=[Leading],Text=[For an implementation that supports
1767 Annex D, a @nt{pragma} Priority specifies the value of the Priority aspect (see
1768 @RefSecNum{Task Priorities}) and a @nt{pragma} Interrupt_Priority specifies the
1769 value of the Interrupt_Priority aspect as follows:]}
1770
1771 @begin{Itemize}
1772
1773 @ChgRef{Version=[3],Kind=[AddedNormal]}
1774 @ChgAdded{Version=[3],Text=[If the @nt{pragma} appears in a @nt{task_definition},
1775 the @nt{expression} is associated with the aspect for the task type or
1776 @nt{single_task_declaration} that contains the @nt{pragma};]}
1777
1778 @ChgRef{Version=[3],Kind=[AddedNormal]}
1779 @ChgAdded{Version=[3],Text=[If the @nt{pragma} appears in a @nt{protected_definition},
1780 the @nt{expression} is associated with the aspect for the protected type or
1781 @nt{single_protected_declaration} that contains the @nt{pragma};]}
1782
1783 @ChgRef{Version=[3],Kind=[AddedNormal]}
1784 @ChgAdded{Version=[3],Text=[If the @nt{pragma} appears in the @nt{declarative_part}
1785 of a @nt{subprogram_body}, the @nt{expression} is associated with the
1786 aspect for the subprogram that contains the @nt{pragma}.]}
1787
1788 @end{Itemize}
1789
1790 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1791 @ChgAdded{Version=[3],Text=[If there is no @nt{expression} in an
1792 Interrupt_Priority pragma, the Interrupt_Priority aspect has the value
1793 Interrupt_Priority'Last.]}
1794 @end{StaticSem}
1795
1796 @begin{DiffWord2005}
1797 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1798 @ChgAdded{Version=[3],Text=[This subclause is new. Pragmas Interrupt_Priority
1799 and Priority were moved here from @RefSecNum{Task Priorities};
1800 aspects Interrupt_Priority and Priority live there now.]}
1801 @end{DiffWord2005}
1802
1803
1804 @LabeledAddedSubClause{Version=[3],Name=[Pragma Relative_Deadline]}
1805
1806 @begin{Syntax}
1807
1808 @begin{SyntaxText}
1809 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1810 @ChgAdded{Version=[3],Type=[Leading],Keepnext=[T],Text=[The form of a
1811 @nt{pragma} Relative_Deadline is as follows:]}
1812 @end{SyntaxText}
1813
1814 @ChgRef{Version=[3],Kind=[AddedNormal]}
1815 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1816 Text=[@key{pragma} @prag<Relative_Deadline> (@SynI{relative_deadline_}@nt{expression});]}>
1817
1818 @end{Syntax}
1819
1820 @begin{Resolution}
1821 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1822 @ChgAdded{Version=[3],Text=[The expected type for a
1823 @SynI{relative_deadline_}@nt{expression} is
1824 Real_Time.Time_Span.@PDefn2{Term=[expected type], Sec=(Relative_Deadline pragma argument)}]}
1825 @end{Resolution}
1826
1827 @begin{Legality}
1828 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1829 @ChgAdded{Version=[3],Text=[A Relative_Deadline pragma is allowed only
1830 immediately within a @nt{task_definition} or the @nt{declarative_part}
1831 of a @nt{subprogram_body}.]}
1832 @end{Legality}
1833
1834 @begin{StaticSem}
1835 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1836 @ChgAdded{Version=[3],Text=[For an implementation that supports Annex D, a
1837 @nt{pragma} Relative_Deadline specifies the value of the Relative_Deadline
1838 aspect (see @RefSecNum{Earliest Deadline First Dispatching}). If the @nt{pragma}
1839 appears in a @nt{task_definition}, the @nt{expression} is associated with the
1840 aspect for the task type or @nt{single_task_declaration} that contains the
1841 @nt{pragma}; otherwise, the @nt{expression} is associated with the aspect
1842 for the subprogram that contains the @nt{pragma}.]}
1843 @end{StaticSem}
1844
1845 @begin{DiffWord2005}
1846 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1847 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Relative_Deadline
1848 was moved here from @RefSecNum{Earliest Deadline First Dispatching};
1849 aspect Relative_Deadline lives there now.]}
1850 @end{DiffWord2005}
1851
1852
1853 @LabeledAddedSubClause{Version=[3],Name=[Pragma Asynchronous]}
1854
1855 @begin{Syntax}
1856 @begin{SyntaxText}
1857 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1858 @ChgAdded{Version=[3],Type=[Leading],Text=[The form of a @nt{pragma}
1859 Asynchronous, which is a representation pragma
1860 (see @RefSecNum{Operational and Representation Aspects}),
1861 is as follows:@PDefn2{Term=[representation pragma], Sec=(Asynchronous)}
1862 @PDefn2{Term=[pragma, representation], Sec=(Asynchronous)}]}
1863 @end{SyntaxText}
1864
1865 @ChgRef{Version=[3],Kind=[AddedNormal]}
1866 @AddedPragmaSyn<Version=[3],@ChgAdded{Version=[3],
1867 Text=[@key{pragma} @prag<Asynchronous> (@Syn2[local_name]);]}>
1868 @end{Syntax}
1869
1870 @begin{StaticSem}
1871 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1872 @ChgAdded{Version=[3],Text=[For an implementation that supports Annex E, a
1873 pragma Asynchronous specifies that the Asynchronous aspect (see
1874 @RefSecNum{Asynchronous Remote Calls}) for the procedure or type denoted by
1875 @nt{local_name} has the value True.]}
1876 @end{StaticSem}
1877
1878 @begin{Legality}
1879 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1880 @ChgAdded{Version=[3],Text=[The @nt{local_name} of a pragma Asynchronous shall
1881 denote a declaration that may have aspect Asynchronous specified.]}
1882 @end{Legality}
1883
1884 @begin{DiffWord2005}
1885 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1],ARef=[AI05-0299-1]}
1886 @ChgAdded{Version=[3],Text=[This subclause is new. Pragma Asynchronous
1887 was moved here from @RefSecNum{Asynchronous Remote Calls};
1888 aspect Asynchronous lives there now.]}
1889 @end{DiffWord2005}
1890
1891