Version 1.1 of ai12s/ai12-0317-1.txt

Unformatted version of ai12s/ai12-0317-1.txt version 1.1
Other versions for file ai12s/ai12-0317-1.txt

!standard 5.5.2(2/3)          19-02-21 AI12-0317-1/01
!standard 5.5.2(5/4)
!standard 5.5.2(7/3)
!class Amendment 19-02-22
!status work item 19-02-22
!status received 19-02-21
!priority Low
!difficulty Easy
!subject Simplifying the rules for newly constructed objects
!summary
Introduce two new terms to avoid duplicate wording in a number of places.
!problem
AI12-0236 causes us to have nearly identical lists of kinds of expressions that represent newly constructed objects of a limited type.
!proposal
We introduce the term "newly constructed" to represent expressions that create a new object out of thin air.
!wording
Modify RM 4.5.9(6/5):
A declare_item that is an object_renaming_declaration (see 8.5.1) shall not rename [an] {a newly constructed} object of a limited type {(see 7.5)} [that is a function_call, aggregate, a parenthesized expression, qualified_expression, or type_conversion with an operand of one of these, a conditional_expression that has at least one dependent_expression that is one of these, or a declare_expression whose body_expression is one of these].
Modify RM 7.5(2.1/5):
In the following contexts, an expression of a limited type is not permitted unless it is {/newly constructed/:} an aggregate, a function_call, a raise_expression, a parenthesized expression or qualified_expression whose operand is [permitted by this rule] {newly constructed}, or a conditional_expression all of whose dependent_expressions are [permitted by this rule] {newly constructed}, or a declare_expression whose body_expression is [permitted by this rule] {newly constructed}: ...
!discussion
!ASIS
No ASIS effect.
!ACATS test
ACATS tests might be needed for the minor changes in these rules: view conversions are allowed as newly constructed objects, and the 4.3.2 rule makes newly legal view conversions illegal in some cases.
Otherwise, no separate ACATS tests should be needed, as the actual rules aren't changing.
!appendix

From: Tucker Taft
Sent: Thursday, February 21, 2019  7:39 AM

Below is a proposed addition to AI12-0236 (well, I suppose it really needs 
to be a "fix-up AI") which eliminates a redundant list of the kinds of 
expressions of a limited type that are allowed or disallowed based on 
whether they are newly constructed.

[This is version /01 of the AI - Editor.]

****************************************************************


Questions? Ask the ACAA Technical Agent