CVS difference for ai05s/ai05-0229-1.txt
--- ai05s/ai05-0229-1.txt 2011/06/07 05:10:01 1.16
+++ ai05s/ai05-0229-1.txt 2011/06/20 04:55:18 1.17
@@ -1,4 +1,20 @@
-!standard 13.2(5) 11-06-06 AI05-0229-1/10
+!standard 13.2(5) 11-06-10 AI05-0229-1/11
+!standard 4.8(15)
+!standard 6.3.2(2)
+!standard 6.3.2(3)
+!standard 6.3.2(4)
+!standard 6.3.2(5)
+!standard 6.3.2(6)
+!standard 6.3.2(6.1/2)
+!standard 6.3.2(7)
+!standard 6.5.1(1/2)
+!standard 6.5.1(2/2)
+!standard 6.5.1(3/2)
+!standard 6.5.1(4/2)
+!standard 6.5.1(8/2)
+!standard 6.5.1(10/2)
+!standard 11.4.1(4/2)
+!standard 13.3.1(0)
!standard 13.11.3(1)
!standard 13.11.3(2)
!standard 13.11.3(3)
@@ -7,9 +23,22 @@
!standard 13.11.3(6)
!standard 13.11.3(7)
!standard 13.11.3(8)
+!standard 13.12.1(4/2)
!standard B.3.3(4)
!standard E.4.1(8)
!standard J.15(0)
+!standard J.15.1(0)
+!standard J.15.2(0)
+!standard J.15.3(0)
+!standard J.15.4(0)
+!standard J.15.5(0)
+!standard J.15.6(0)
+!standard J.15.7(0)
+!standard J.15.8(0)
+!standard J.15.9(0)
+!standard J.15.11(0)
+!standard J.15.12(0)
+!standard J.15.13(0)
!standard K.1(0)
!class Amendment 10-10-25
!status Amendment 2012 11-06-06
@@ -69,15 +98,15 @@
it here as well. Any preference??]
In addition, other operational and
-representation aspects not associated with specifiable attributes may
-be specified, as specified elsewhere in this International Standard.
+representation aspects not associated with specifiable attributes or representation
+pragmas may be specified, as specified elsewhere in this International Standard.
Modify 13.12.1(4/2):
No_Obsolescent_Features
There is no use of language features defined in Annex J. It is implementation-defined
-if uses of the renamings of J.1 {and the pragmas of J.15} are detected by this
+if uses of the renamings of J.1 {and of the pragmas of J.15} are detected by this
restriction. This restriction applies only to the current compilation or environment,
not the entire partition.
@@ -167,7 +196,7 @@
===pragma No_Return (the pragma is to be obsolescent)
-Change the title of clause 6.5.1 to "Non-returning procedures".
+Change the title of clause 6.5.1 to "Non-returning Procedures".
Modify 6.5.1(1/2):
@@ -209,7 +238,7 @@
procedure Raise_Exception(E : in Exception_Id;
Message : in String := ""){
- with No_Return => True;
+ with No_Return => True};
[pragma No_Return(Raise_Exception);]
[This is the only use of No_Return in an Ada predefined package.]
@@ -218,6 +247,8 @@
Delete the entire subclause 13.11.3.
+Remove "(see 13.11.3)" from 4.8(15).
+
===pragma Unchecked_Union: (the pragma is to be obsolescent)
Change the title of clause B.3.3 to "Unchecked Union Types".
@@ -493,7 +524,7 @@
representation aspect may be specified:
Inline
The type of aspect Inline is Boolean. When aspect Inline is True for a
- callable entity, indicates that inline expansion is
+ callable entity, inline expansion is
desired for all calls to that entity. When aspect Inline is True for a
generic subprogram, inline expansion is desired for all calls to all
instances of that generic subprogram.
@@ -1817,6 +1848,157 @@
Therefore, we decided to drop this pragma completely (rather than turn it into
an aspect).
+!corrigendum 4.8(15)
+
+@drepl
+@s9<27 Implementations are permitted, but not required, to provide garbage collection
+(see 13.11.3).>
+@dby
+@s9<27 Implementations are permitted, but not required, to provide garbage collection.>
+
+!corrigendum 6.3.2(2)
+
+@ddel
+The form of a @fa<pragma> Inline, which is a program unit pragma (see 10.1.5), is as follows:
+
+!corrigendum 6.3.2(3)
+
+@ddel
+@xindent<@b<pragma> Inline(@fa<name> {, @fa<name>});>
+
+!corrigendum 6.3.2(4)
+
+@ddel
+The @fa<pragma> shall apply to one or more callable entities or generic subprograms.
+
+!corrigendum 6.3.2(5)
+
+@drepl
+If a @fa<pragma> Inline applies to a callable entity, this indicates that inline expansion is
+desired for all calls to that entity. If a @fa<pragma> Inline applies to a generic subprogram,
+this indicates that inline expansion is desired for all calls to all instances of that generic
+subprogram.
+@dby
+For a callable entity or a generic subprogram, the following language-defined
+representation aspect may be specified:
+
+@xhang<@xterm<Inline>The type of aspect Inline is Boolean. When aspect Inline is
+True for a callable entity, inline expansion is
+desired for all calls to that entity. When aspect Inline is True for a
+generic subprogram, inline expansion is desired for all calls to all
+instances of that generic subprogram.>
+
+@xindent<If directly specified, the @fa<aspect_definition> shall be a static expression.
+This aspect is never inherited; if not directly specified, the aspect is False.>
+
+!corrigendum 6.3.2(6)
+
+@drepl
+For each call, an implementation is free to follow or to ignore the
+recommendation expressed by the @fa<pragma>.
+@dby
+For each call, an implementation is free to follow or to ignore the
+recommendation determined by the Inline aspect.
+
+!corrigendum 6.3.2(6.1/2)
+
+@ddel
+An implementation may allow a @fa<pragma> Inline that has an argument which is a
+@fa<direct_name> denoting a @fa<subprogram_body> of the same @fa<declarative_part>.
+
+!corrigendum 6.3.2(7)
+
+@ddel
+@s9<NOTES@hr
+The @fa<name> in a @fa<pragma> Inline can denote more than one entity in the case of
+overloading. Such a @fa<pragma> applies to all of the denoted entities.>
+
+!corrigendum 6.5.1(1/2)
+
+@drepl
+A @fa<pragma> No_Return indicates that a procedure cannot return normally; it may
+propagate an exception or loop forever.
+@dby
+Specifying aspect No_Return to have the value True
+indicates that a procedure cannot return normally; it may propagate
+an exception or loop forever.
+
+!corrigendum 6.5.1(2/2)
+
+@ddel
+The form of a @fa<pragma> No_Return, which is a representation pragma (see 13.1),
+is as follows:
+
+!corrigendum 6.5.1(3/2)
+
+@drepl
+@xindent<@b<pragma> No_Return(@i<procedure_>@fa<local_name>{, @i<procedure_>@fa<local_name>});>
+@dby
+@s8<@i<Static Semantics>>
+
+For a procedure or generic procedure, the following language-defined
+representation aspect may be specified:
+
+@xhang<@xterm<No_Return>
+The type of aspect No_Return is Boolean. When aspect No_Return is True for
+an entity, the entity is said to be @i<non-returning>.>
+
+@xindent<If directly specified, the @fa<aspect_definition> shall be a static expression.
+This aspect is never inherited; if not directly specified, the aspect is False.>
+
+If a generic procedure is non-returning, then so are its instances. If a procedure
+declared within a generic unit is non-returning, then so are the corresponding copies of
+that procedure in instances.
+
+!corrigendum 6.5.1(4/2)
+
+@drepl
+Each @i<procedure_>@fa<local_name> shall denote one or more procedures or generic
+procedures; the denoted entities are @i<non-returning>. The @i<procedure_>@fa<local_name>
+shall not denote a null procedure nor an instance of a generic unit.
+@dby
+Aspect No_Return shall not be specified for a null procedure nor an
+instance of a generic unit.
+
+!corrigendum 6.5.1(8/2)
+
+@ddel
+If a generic procedure is non-returning, then so are its instances. If a procedure
+declared within a generic unit is non-returning, then so are the corresponding copies
+of that procedure in instances.
+
+!corrigendum 6.5.1(10/2)
+
+@drepl
+@xcode<@b<procedure> Fail(Msg : String); --@ft<@i< raises Fatal_Error exception>>
+@b<pragma> No_Return(Fail);
+ --@ft<@i< Inform compiler and reader that procedure never returns normally>>>
+@dby
+@xcode<@b<procedure> Fail(Msg : String) --@ft<@i< raises Fatal_Error exception>>
+ @b<with> No_Return =@> True;
+ --@ft<@i< Inform compiler and reader that procedure never returns normally>>>
+
+!corrigendum 11.4.1(4/2)
+
+@drepl
+@xcode< @b<procedure> Raise_Exception(E : @b<in> Exception_Id;
+ Message : @b<in> String := "");
+ @b<pragma> No_Return(Raise_Exception);
+ @b<function> Exception_Message(X : Exception_Occurrence) @b<return> String;
+ @b<procedure> Reraise_Occurrence(X : @b<in> Exception_Occurrence);>
+@dby
+@xcode< @b<procedure> Raise_Exception(E : @b<in> Exception_Id;
+ Message : @b<in> String := "")
+ @b<with> No_Return =@> True;
+ @b<function> Exception_Message(X : Exception_Occurrence) @b<return> String;
+ @b<procedure> Reraise_Occurrence(X : @b<in> Exception_Occurrence);>
+
+!corrigendum 13.3.1(0)
+
+@dinsc
+
+Force a conflict; the real text is found in the conflict file.
+
!corrigendum 13.11.3(1)
@ddel
@@ -1863,6 +2045,399 @@
An implementation need not support garbage collection, in which case, a pragma Controlled
has no effect.
+!corrigendum 13.12.1(4/2)
+
+@drepl
+@xhang<@xterm<No_Obsolescent_Features>
+There is no use of language features defined in Annex J. It is
+implementation defined whether uses of the renamings of J.1 are detected by this
+restriction. This restriction applies only to the current compilation or
+environment, not the entire partition.>
+@dby
+@xhang<@xterm<No_Obsolescent_Features>
+There is no use of language features defined in Annex J. It is
+implementation defined whether uses of the renamings of J.1 and of the @fa<pragma>s of
+J.15 are detected by this restriction. This restriction applies only to the current
+compilation or environment, not the entire partition.>
+
+!corrigendum J.15(0)
+
+@dinsc
+Pragmas can be used as an alternative to aspect_specifications to specify
+certain aspects.
+
+!corrigendum J.15.1(0)
+
+@dinsc
+
+@s8<@i<Syntax>>
+
+The form of a pragma Inline, which is a program unit pragma (see
+10.1.5), is as follows:
+
+@xindent<@b<pragma> Inline(@fa<name> {, @fa<name>});>
+
+@s8<@i<Legality Rules>>
+
+The @fa<pragma> shall apply to one or more callable entities or generic
+subprograms.
+
+@s8<@i<Static Semantics>>
+
+@fa<Pragma> Inline specifies that the Inline aspect (see 6.3.2) for each
+entity denoted by each @fa<name> given in the @fa<pragma> has the value True.
+
+@s8<@i<Implementation Permissions>>
+
+An implementation may allow a @fa<pragma> Inline that has an argument which
+is a @fa<direct_name> denoting a @fa<subprogram_body> of the same
+@fa<declarative_part>.
+
+@s9<NOTES@hr
+The name in a @fa<pragma> Inline may denote more than one entity in the
+case of overloading. Such a @fa<pragma> applies to all of the denoted entities.>
+
+!corrigendum J.15.2(0)
+
+@dinsc
+
+@s8<@i<Syntax>>
+
+The form of a @fa<pragma> No_Return, which is a representation pragma (see 13.1),
+is as follows:
+
+@xindent<@b<pragma> No_Return(@i<procedure_>@fa<local_name>{, @i<procedure_>@fa<local_name>});>
+
+@s8<@i<Legality Rules>>
+
+Each @i<procedure_>@fa<local_name> shall denote one or more procedures or generic
+procedures. The @i<procedure_>@fa<local_name> shall not denote a null
+procedure nor an instance of a generic unit.
+
+@s8<@i<Static Semantics>>
+
+@fa<Pragma> No_Return specifies that the No_Return aspect (see 6.3.2) for each
+procedure denoted by each @fa<local_name> given in the @fa<pragma> has the value True.
+
+
+
+** TBD below here...
+
+J.15.3 Pragma Pack
+
+@s8<@i<Syntax>>
+
+The form of a pragma Pack, which is a representation pragma (see 13.1),
+is as follows:
+ pragma Pack(*first_subtype_*local_name);
+
+@s8<@i<Legality Rules>>
+
+The first_subtype_local_name of a pragma Pack shall denote a composite
+subtype.
+
+@s8<@i<Static Semantics>>
+
+Pragma Pack specifies that the Pack aspect (see 13.2) for the type
+denoted by *first_subtype_*local_name has the value True.
+
+J.15.4 pragma Storage_Size
+
+@s8<@i<Syntax>>
+
+The form of a pragma Storage_Size is as follows:
+
+ pragma Storage_Size(expression);
+
+A pragma Storage_Size is allowed only immediately within a task_definition.
+
+@s8<@i<Name Resolution Rules>>
+
+The expression of a pragma Storage_Size is expected to be of any integer type.
+
+@s8<@i<Static Semantics>>
+
+The pragma Storage_Size sets the Storage_Size aspect (see 13.3) of the type defined
+by the immediately enclosing task_definition to the value of the expression of the
+pragma.
+
+J.15.5 Interfacing pragmas
+
+@s8<@i<Syntax>>
+
+An interfacing pragma is a representation pragma that is one of the pragmas Import,
+Export, or Convention. Their forms are as follows:
+
+ pragma Import(
+ [Convention =>] convention_identifier, [Entity =>] local_name
+ [, [External_Name =>] external_name_string_expression] [, [Link_Name =>] link_name_string_expression]);
+
+ pragma Export(
+ [Convention =>] convention_identifier, [Entity =>] local_name
+ [, [External_Name =>] external_name_string_expression] [, [Link_Name =>] link_name_string_expression]);
+
+ pragma Convention([Convention =>] convention_identifier,[Entity =>] local_name);
+
+For pragmas Import and Export, the argument for Link_Name shall not be given without
+the pragma_argument_identifier unless the argument for External_Name is given.
+
+@s8<@i<Name Resolution Rules>>
+
+The expected type for a external_name_string_expression and a link_name_string_expression
+in an interfacing pragma is String.
+
+@s8<@i<Legality Rules>>
+
+The convention_identifier of an interfacing pragma shall be the name of a convention (see B.1).
+
+A pragma Import shall be the completion of a declaration.
+
+The external_name_string_expression and link_name_string_expression of a pragma Import
+or Export shall be static.
+
+The local_name of of each of these pragmas shall denote a declaration that may have
+the similarly named aspect specified.
+
+@s8<@i<Static Semantics>>
+
+An interfacing pragam specifies various aspects of the entity denoted by the
+local_name as follows:
+
+* The Convention aspect (see B.1) is convention_identifier.
+
+* A pragma Import specifies that the Import aspect (see B.1) is True.
+
+* A pragma Export specifies that the Export aspect (see B.1) is True.
+
+* For both pragma Import and Export, if an
+ external name is given in the pragma, the External_Name aspect
+ is specified to be external_name_string_expression. If a link name
+ is given in the pragma, the Link_Name aspect is specified to be the
+ link_name_string_expression.
+
+J.15.6 Pragma Unchecked_Union
+
+@s8<@i<Syntax>>
+
+The form of a pragma Unchecked_Union, which is a representation pragma (see
+13.1), is as follows:
+
+ pragma Unchecked_Union (first_subtype_local_name);
+
+@s8<@i<Legality Rules>>
+
+The first_subtype_local_name of a pragma Unchecked_Union shall denote an
+unconstrained discriminated record subtype having a variant_part.
+
+@s8<@i<Static Semantics>>
+
+A pragma Unchecked_Union specifies that the Unchecked_Union aspect (see B.3.3)
+for the type denoted by *first_subtype_*local_name has the value True.
+
+J.15.7 Pragmas Interrupt_Handler and Attach_Handler
+
+The form of a pragma Interrupt_Handler is as follows:
+ pragma Interrupt_Handler(handler_name);
+
+The form of a pragma Attach_Handler is as follows:
+ pragma Attach_Handler(handler_name, expression);
+
+@s8<@i<Name Resolution Rules>>
+
+For the Interrupt_Handler and Attach_Handler pragmas, the handler_name shall
+resolve to denote a protected procedure with a parameterless profile.
+
+For the Attach_Handler pragma, the expected type for the expression is
+Interrupts.Interrupt_Id (see C.3.2).
+
+@s8<@i<Legality Rules>>
+
+The Attach_Handler and Interrupt_Handler pragmas are only allowed immediately
+within the protected_definition where the corresponding subprogram is declared.
+The corresponding protected_type_declaration or single_protected_declaration
+shall be a library-level declaration, and shall not be declared within a generic
+body. In addition to the places where Legality Rules normally apply (see 12.3),
+these rules also apply in the private part of an instance of a generic unit.
+
+@s8<@i<Static Semantics>>
+
+For an implementation that supports Annex C, a pragma Interrupt_Handler
+specifies the Interrupt_Handler aspect (see C.3.1) for the protected procedure
+handler_name to have the value True. For an implementation that supports Annex
+C, a pragma Attach_Handler specifies the Attach_Handler aspect (see C.3.1) for
+the protected procedure handler_name to have the value of the given expression
+[Redundant: as evaluated at object creation time].
+
+J.15.8 Shared variable pragmas
+
+@s8<@i<Syntax>>
+
+The form for pragmas Atomic, Volatile, Independent, Atomic_Components, and
+Volatile_Components, and Independent_Components is as follows:
+
+ pragma Atomic(local_name);
+
+ pragma Volatile(local_name);
+
+ pragma Independent(component_local_name);
+
+ pragma Atomic_Components(array_local_name);
+
+ pragma Volatile_Components(array_local_name);
+
+ pragma Independent_Components(local_name);
+
+@s8<@i<Name Resolution Rules>>
+
+The local_name in an Atomic or Volatile pragma shall resolve to denote either
+an object_declaration, a non-inherited component_declaration, or a
+full_type_declaration. The component_local_name in an Independent pragma shall
+resolve to denote a non-inherited component_declaration. The array_local_name
+in an Atomic_Components or Volatile_Components pragma shall resolve to denote
+the declaration of an array type or an array object of an anonymous type.
+The local_name in an Independent_Components pragma shall resolve to denote the
+declaration of an array or record type or an array object of an anonymous type.
+
+@s8<@i<Static Semantics>>
+
+These pragmas are representation pragmas (see 13.1). Each of these pragmas
+specifies that the similarly named aspect (see C.6) of the type, object, or
+component denoted by its argument is True.
+
+@s8<@i<Legality Rules>>
+
+The local_name of of each of these pragmas shall denote a declaration that may have
+the similarly named aspect specified.
+
+J.15.9 pragma CPU
+
+AARM Discussion: This pragma is born obsolescent; it is defined to provide
+consistency with existing real-time pragmas.
+
+@s8<@i<Syntax>>
+
+The form of a pragma CPU is as follows:
+ pragma CPU (expression);
+
+@s8<@i<Name Resolution Rules>>
+
+The expected type for the expression of a pragma CPU is
+System.Multiprocessors.CPU_Range.
+
+@s8<@i<Legality Rules>>
+
+A CPU pragma is allowed only immediately within a task_definition, or the
+declarative_part of a subprogram_body. At most one such pragma shall appear
+within a given construct.
+
+For a CPU pragma that appears in the declarative_part of a subprogram_body, the
+expression shall be static.
+
+@s8<@i<Static Semantics>>
+
+For an implementation that supports Annex D, a pragma CPU specifies the value of
+the CPU aspect (see D.16). If the pragma appears in a task_definition, the
+expression is associated with the aspect for the task type or
+single_task_definition that contains the pragma; otherwise, the expression is
+associated with the aspect for the subprogram that contains the pragma.
+
+[Editor's note: J.15.10 is in AI05-0167-1.]
+
+J.15.11 Pragmas Priority and Interrupt_Priority
+
+@s8<@i<Syntax>>
+
+The form of a pragma Priority is as follows:
+
+ pragma Priority(expression);
+
+The form of a pragma Interrupt_Priority is as follows:
+
+ pragma Interrupt_Priority[(expression)];
+
+@s8<@i<Name Resolution Rules>>
+
+The expected type for the expression in a Priority or Interrupt_Priority pragma
+is Integer.
+
+@s8<@i<Legality Rules>>
+
+A Priority pragma is allowed only immediately within a task_definition, a
+protected_definition, or the declarative_part of a subprogram_body. An
+Interrupt_Priority pragma is allowed only immediately within a task_definition
+or a protected_definition. At most one such pragma shall appear within a given
+construct.
+
+For a Priority pragma that appears in the declarative_part of a subprogram_body,
+the expression shall be static, and its value shall be in the range of
+System.Priority.
+
+@s8<@i<Static Semantics>>
+
+For an implementation that supports Annex D, a pragma Priority specifies the
+value of the Priority aspect (see D.1) and a pragma Interrupt_Priority specifies
+the value of the Interrupt_Priority aspect as follows:
+* If the pragma appears in a task_definition, the expression is associated with
+ the aspect for the task type or single_task_definition that contains the
+ pragma;
+* If the pragma appears in a protected_definition, the expression is associated
+ with the aspect for the protected type or single_protected_definition that
+ contains the pragma;
+* If the pragma appears in the declarative part of a subprogram_body, the
+ expression is associated with the aspect for the subprogram that contains the
+ pragma.
+
+If there is no expression in an Interrupt_Priority pragma, the
+Interrupt_Priority aspect has the value Interrupt_Priority'Last.
+
+J.15.12 pragma Relative_Deadline
+
+@s8<@i<Syntax>>
+
+The form of a pragma Relative_Deadline is as follows:
+ pragma Relative_Deadline (relative_deadline_expression);
+
+@s8<@i<Name Resolution Rules>>
+
+The expected type for relative_deadline_expression is Real_Time.Time_Span.
+
+@s8<@i<Legality Rules>>
+
+A Relative_Deadline pragma is allowed only immediately within a task_definition
+or the declarative_part of a subprogram_body. At most one such pragma shall
+appear within a given construct.
+
+@s8<@i<Static Semantics>>
+
+For an implementation that supports Annex D, a pragma Relative_Deadline
+specifies the value of the Relative_Deadline aspect (see D.2.6). If the pragma
+appears in a task_definition, the expression is associated with the aspect for
+the task type or single_task_definition that contains the pragma; otherwise, the
+expression is associated with the aspect for the subprogram that contains the
+pragma.
+
+J.15.13 Pragma Asynchronous
+
+@s8<@i<Syntax>>
+
+The form of a pragma Asynchronous, which is a representation pragma (see 13.1),
+is as follows:
+
+ pragma Asynchronous(local_name);
+
+@s8<@i<Static Semantics>>
+
+For an implementation that supports Annex E, a pragma Asynchronous specifies
+that the Asynchronous aspect (see E.4.1) for the procedure or type denoted by
+local_name has the value True.
+
+@s8<@i<Legality Rules>>
+
+The local_name of a pragma Asynchronous shall denote a declaration that may have
+aspect Asynchronous specified.
+
+
+
!ACATS test
@@ -3650,7 +4225,9 @@
@aspect-index-entry{Precondition|Specifies a condition that must
hold true in order to call a given subprogram.}
-(or whatever the correct macro-call syntax is -- I assume it's still vaguely based on Scribe). The macro will automatically generate an entry in the Annex, including the section number, plus an entry in the index.
+(or whatever the correct macro-call syntax is -- I assume it's still vaguely based
+on Scribe). The macro will automatically generate an entry in the Annex, including
+the section number, plus an entry in the index.
Tell me whether you want the macro call before, after, or part of the relevant
paragraph.
Questions? Ask the ACAA Technical Agent