!standard 3.1(6/3) 19-03-04 AI12-0308-1/03 !standard 3.3(6) !standard 3.3(18.1/3) !standard 3.3.1(23/3) !standard 5.5.3(0) !standard 8.1(2.1/4) !standard 8.1(4.1/4) !reference AI12-0189-1 !reference AI12-0212-1 !reference AI12-0251-1 !class Amendment 19-02-05 !status Amendment 1-2012 19-02-05 !status WG9 Approved 22-06-22 !status ARG Approved 10-0-0 19-02-11 !status work item 19-02-05 !status received 19-01-21 !priority Low !difficulty Easy !subject Declared entities need to be declarations !summary Make sure that all declarations are mentioned in 3.1, and every declarative region is mentioned in 8.1. !problem Various AIs have defined new kinds of declarations without adding them to the list of possible declarations in 3.1 and in some cases without adding them to the list of declarative regions in 8.1. Moreover, the parameter names declared for procedural iterators aren't even treated as declarations in their own specification -- but somehow those names become visible. Finally, the parameter of a chunk_specification should be an object and constant. !proposal (See Summary.) !wording Modify 3.1(6/5): Each of the following is defined to be a declaration: any basic_declaration; an enumeration_literal_specification; a discriminant_specification; a component_declaration; {a defining_identifier of }an iterated_component_association; a loop_parameter_specification; {a defining_identifier of a chunk_specification;} an iterator_specification; {a defining_identifier of an iterator_parameter_specification; }a parameter_specification; a subprogram_body; an extended_return_object_declaration; an entry_declaration; an entry_index_specification; a choice_parameter_specification; a generic_formal_parameter_declaration. [Editor's notes: These are given in the order that they appear in the Standard. We don't need iterator_element_specification here as it contains loop_parameter_specification or iterator_specification, which are both here. We need to add the defining_identifier of an iterated_component_association so we aren't covering these with iterator_specifications. Similarly, we only are interested in the defining_identifier of a chunk_specification.] Add after 3.3(6) (as a bulleted list item): - the chunk parameter of a chunk_specification; Add after 3.3(18.1/3) (as a bulleted list item): - the chunk parameter of a chunk_specification; Add ", chunk_specification" in the comma-separated list of 3.3.1(23/3), immediately after ", iterator_component_association". Replace 5.5.3(3/5) with: iterator_parameter_specification ::= formal_part | (defining_identifier{, defining_identifier}) Modify 5.5.3(13/5): The anonymous access-to-procedure type /A/ shall have at least one formal parameter in its parameter profile. If the iterator_parameter_specification is a formal_part, then this formal_part shall be mode conformant with that of /A/. If the iterator_parameter_specification is a list of {defining_}identifiers, the number of formal parameters of /A/ shall be the same as the length of this list. Modify 5.5.3(15/5): A loop_statement with an iteration_scheme that has a procedural_iterator is equivalent to a local declaration of a procedure P followed by a procedure_call_statement that is formed from the iterator_procedure_call by replacing the <> of the parameter_association_with_box with P'Access. The formal_part of the locally declared procedure P is formed from the formal_part of the anonymous access-to-procedure type /A/, by replacing the identifier of each formal parameter of this formal_part with the identifier of the corresponding formal parameter or element of the list of {defining_}identifiers given in the iterator_parameter_specification. Add after 8.1(2.1/4): * an iterated_component_association; * an iterated_element_association; * a quantified_expression; * a declare_expression; [Editor's note: These are given in the order they appear in the RM, except that we messed that up by misplacing quantified_expression and more recently with declare_expression and iterated_component_assocation; I've moved all of them to fix that.] Delete 8.1(4.1/4) (which was misplaced). !discussion All of these changes are needed to keep the wording for new features consistent with that for existing features. !corrigendum 3.1(6/3) @drepl Each of the following is defined to be a declaration: any @fa; an @fa; a @fa; a @fa; a @fa; an @fa; a @fa; a @fa; an @fa; an @fa; an @fa; a @fa; a @fa. @dby Each of the following is defined to be a declaration: any @fa; an @fa; a @fa; a @fa; a @fa of an @fa; a @fa; a @fa of a @fa; an @fa; a @fa of an @fa; a @fa; a @fa; an @fa; an @fa; an @fa; a @fa; a @fa. !corrigendum 3.3(6) @dinsa @xbullet @dinst @xbullet;> !corrigendum 3.3(18.1/3) @dinsa @xbullet @dinst @xbullet;> !corrigendum 3.3.1(23/3) @drepl @xindent<@s9<8 As indicated above, a stand-alone object is an object declared by an @fa. Similar definitions apply to "stand-alone constant" and "stand-alone variable." A subcomponent of an object is not a stand-alone object, nor is an object that is created by an @fa. An object declared by a @fa, @fa, @fa, @fa, @fa, @fa, or a @fa of mode @b is not considered a stand-alone object.>> @dby @xindent<@s9<8 As indicated above, a stand-alone object is an object declared by an @fa. Similar definitions apply to "stand-alone constant" and "stand-alone variable." A subcomponent of an object is not a stand-alone object, nor is an object that is created by an @fa. An object declared by a @fa, @fa, @fa, @fa, @fa, @fa, @fa, @fa, or a @fa of mode @b is not considered a stand-alone object.>> !corrigendum 5.5.3(0) @dinsc Just a fake; the actual wording is in the conflict file. !corrigendum 8.1(2.1/4) @dinsa @xbullet;> @dinss @xbullet;> @xbullet;> @xbullet;> @xbullet;> !corrigendum 8.1(4.1/4) @ddel @xbullet;> !ASIS No ASIS changes needed. !ACATS test No separate ACATS tests needed. !appendix From: Tucker Taft Sent: Friday, January 11, 2019 5:07 PM > ..., so the > new item should go between iterated_component_specification and > loop_parameter_specification. > > I've updated AI12-0190-1 this way. > > Vaguely related question: > > Procedural iterators in 5.5.3 use a similar formulation. Should they > have these same fixes (identifier => defining_identifier, and adding > to the 3.1 list)?? They don't have conformance issues, but it seem odd > to use a name in an expression without ever having a declaration for > it. (I'd have to put that in a separate AI.) Yes, we should be consistent and change this to defining_identifier and add to 3.1 list. > Also, I note "iterated_component_association" here. Shouldn't the > container aggregate "iterated_element_association" also appear here > (3.1(6/5))?? Note that that can matter to conformance. I don't see > that in AI12-0212-1 (which I haven't gotten into the draft RM yet). Yes, good catch. **************************************************************** From: Randy Brukardt Sent: Monday, January 21, 2019 11:15 PM > > Vaguely related question: > > > > Procedural iterators in 5.5.3 use a similar formulation. > > Should they have these same fixes (identifier => > > defining_identifier, and adding to the 3.1 list)?? They don't have > > conformance issues, but it seem odd to use a name in an expression > > without ever having a declaration for it. (I'd have to put that in a > > separate AI.) > > > > Also, I note "iterated_component_association" here. Shouldn't the > > container aggregate "iterated_element_association" also appear here > > (3.1(6/5))?? Note that that can matter to conformance. I don't see > > that in AI12-0212-1 (which I haven't gotten into the draft RM yet). > > "chunk_specification" also declares an object that isn't mentioned in > 3.1(6/5), either. So that too (three?? ;-) should be added, right? I also note that iterated_component_association is in 8.1, defining a declarative region. More likely, iterated_element_association also needs to be in 8.1. (A chunk_specification would share the declarative region with the enclosing loop_statement, so it doesn't need to be in 8.1. The same probably applies to procedural iterators.) This is mostly a note so I don't forget these things should I ever get around to making a fix-up AI. **************************************************************** From: Tucker Taft Sent: Tuesday, January 22, 2019 2:43 PM > I also note that iterated_component_association is in 8.1, defining a > declarative region. More likely, iterated_element_association also needs > to be in 8.1. (A chunk_specification would share the declarative region > with the enclosing loop_statement, so it doesn't need to be in 8.1. The > same probably applies to procedural iterators.) Makes sense. ****************************************************************