CVS difference for ai22s/ai22-0036-1.html
--- ai22s/ai22-0036-1.html 2023/01/10 08:04:23 1.5
+++ ai22s/ai22-0036-1.html 2023/01/21 09:16:19 1.6
@@ -1,10 +1,10 @@
<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>13.14(4/1)</title>
<style type="text/css">
table td,table th{padding:0}
-.c13{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:0pt;border-right-width:0pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:0pt;border-top-style:solid;background-c
olor:#f0f0f0;border-left-style:solid;border-bottom-width:0pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
-.c26{border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c18{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c5{height:0pt}
+.c22{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:0pt;border-right-width:0pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:0pt;border-top-style:solid;background-c
olor:#f0f0f0;border-left-style:solid;border-bottom-width:0pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
+.c23{border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c29{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c12{height:0pt}
P.head{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:14pt; padding-bottom:0pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:
400; text-decoration:none; vertical-align:baseline; font-style:normal}
H2.head{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:12pt; color:#000000; font-size:14pt; padding-bottom:6pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; page-break-after:avoid; orphans:2; widows:2; tex
t-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
P.inst{margin-bottom:0; margin-top:0; margin-left:18pt; margin-right:0; padding-top:9pt; color:#000000; font-size:12pt; padding-bottom:6pt; font-family:"Arial","Liberation Sans",sans-serif;line-height:1.15; orphans:2; widows:2; text-align:left; font-weigh
t:400; text-decoration:none; vertical-align:baseline; font-style:normal}
@@ -21,11 +21,11 @@
SPAN.ins{color:#008800}
SPAN.del{color:#880000}
SPAN.ntrm{font-family:"Arial","Liberation Sans",sans-serif}
-P.a3{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; padding-top:0pt; padding-bottom:3pt; line-height:1.1500000000000001; page-break-after:avoid; orphans:2; widows
:2; text-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+P.a3{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; orphans:2; widows:2; padding-top:0pt; padding-bottom:3pt; line-height:1.1500000000000001; page-break-after:avo
id; text-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
</style>
-</head><body class="c18 doc-content"><p class="a3">AI22-0036-1</p>
+</head><body class="c29 doc-content"><p class="a3">AI22-0036-1</p>
<p class="head">!standard 8.6(17/3)
- 22-12-29 AI22-0036-1/06</p>
+ 23-01-20 AI22-0036-1/07</p>
<p class="head">!standard 13.14(4/1)</p>
<p class="head">!standard 13.14(7.2/5)</p>
<p class="head">!standard 13.14(8/4)</p>
@@ -33,6 +33,7 @@
<p class="head">!standard 13.14(10/5)</p>
<p class="head">!standard 13.14(15.2/5)</p>
<p class="head">!class binding interpretation 22-01-26</p>
+<p class="head">!status ARG Approved 8-0-5 23-01-19</p>
<p class="head">!status work item 22-01-26</p>
<p class="head">!status received 21-04-28</p>
<p class="head">!priority Low</p>
@@ -40,8 +41,8 @@
<p class="head">!qualifier Omission</p>
<p class="head">!subject Attributes in the expression of Default_Value</p>
<h2 class="head">!summary</h2>
-<p class="txts">The attributes First, Last, Val, and Pos can be used in the expression of a
-Default_Value aspect specification, as can an enumeration literal. This requires changes to
+<p class="txts">The attributes First, Last, Val, Pos, Pred, and Succ can be used in the expression
+of a Default_Value aspect specification, as can an enumeration literal. This requires changes to
the freezing rules, which we reorganize to clarify the distinction between what constructs
"cause freezing" and what entities are "frozen" when used in a construct
that causes freezing.</p>
@@ -56,8 +57,8 @@
so it is not inherited), but all such conversions are illegal.</p>
<p class="text">For instance:</p>
-<a id="t.93cdc93f7933f0879b1b6e02881eb544af0506d7"></a><a id="t.0"></a><table class="c26"></table><p class="text"> </p>
-<a id="t.95917217e1d5f0ad5def57a7c4bf5b8bfff0930c"></a><a id="t.1"></a><table class="c26"><tr class="c5"><td class="c13">
+<a id="t.93cdc93f7933f0879b1b6e02881eb544af0506d7"></a><a id="t.0"></a><table class="c23"></table><p class="text"> </p>
+<a id="t.95917217e1d5f0ad5def57a7c4bf5b8bfff0930c"></a><a id="t.1"></a><table class="c23"><tr class="c12"><td class="c22">
<p class="codt"> <b>type</b> Char <b>is</b> <b>new</b> Character <br>
<b>with</b> Default_Value => Char (Ada.Characters.Latin_1.Nul);</p>
</td></tr></table><p class="text"> </p>
@@ -83,9 +84,9 @@
attribute which is defined for (at least some) scalar subtypes and is not defined for (any) scalar
objects [redundant: (for example, the Val attribute)].</li>
</ul>
-<p class="wind">AARM Discussion: Language-defined scalar subtype attributes that might be used here
-include First, Last, Val, and Pos. Enum_Val and Enum_Rep could not be used as they would freeze the
-type.</p>
+<p class="wind">{AARM Discussion: Language-defined scalar subtype attributes that might be used
+here include First, Last, Val, and Pos. Enum_Val and Enum_Rep could not be used as they would
+freeze the type.}</p>
<p class="inst">Modify and reorder 13.14, starting at (4/1) and continuing through (15.3/5)):</p>
<p class="word">A construct that (explicitly or implicitly) references an entity can cause the
@@ -111,14 +112,14 @@
freezing of any progenitor types specified in the declaration. </li>
<li><<Was (8/4)>>A static expression <span class="del">[(other than within an
<span class="ntrm">aspect_specification</span>)]</span> causes freezing where it
-occurs<span class="ins">{ with the following exceptions:}</span></li>
+occurs<span class="ins">{ with the following exceptions:}</span>
<ul class="wbl"><li><span class="ins">{Any freezing caused by a static expression occurring within
an <span class="ntrm">aspect_specification</span> is postponed at least until the
<span class="ntrm">aspect_specification</span> is resolved (see below);</span></li>
<li><span class="ins">An enumeration literal used as a <span class="ntrm">discrete_choice</span> of
the <span class="ntrm">array_aggregate</span> of an
<span class="ntrm">enumeration_representation_clause </span>does not cause freezing}</span>.</li>
-</ul>
+</ul></li>
<li><<Was second half of (8/4)>>An object name or nonstatic expression
causes freezing where it occurs, unless the name or expression is part of a
<span class="ntrm">default_expression</span>, a <span class="ntrm">default_name,</span> the return
@@ -145,14 +146,18 @@
<span class="ntrm">aspect_specification</span> <span class="del">[also]</span> cause
freezing<span class="ins">{ both at the freezing point of the entity associated with the
<span class="ntrm">aspect_specification</span>, and}</span> at the end of the immediately enclosing
-declaration list<span class="ins">{, with the following exceptions:}</span></li>
+declaration list<span class="ins">{, with the following exceptions:}</span>
<ul class="wbl"><li><span class="ins">{static expressions of the form S'First, S'Last,
-S'Val(...), or S'Pos(...) and static ranges of the form S'Range do not cause freezing
-if they occur within an <span class="ntrm">aspect_defintion</span> for the Default_Value aspect of
-a type <i>T</i>, where S is a static subtype of <i>T</i>;</span></li>
-<li><span class="ins">an enumeration literal does not cause freezing if it occurs within an
-<span class="ntrm">aspect_definition</span> for the Default_Value aspect of its type}</span>.</li>
-</ul>
+S'Val(...), S'Pos(...), S’Succ(...), or S’Pred(...), and static ranges of the
+form S'Range do not cause freezing if they occur within an
+<span class="ntrm">aspect_definition</span> for the Default_Value aspect of a type <i>T</i>, where
+S is a static subtype of <i>T</i>;}</span>
+<p class="wind"><span class="ins">{AARM Reason: These attributes are well defined independent of
+the representation of the type.}</span></p></li>
+<li><span class="ins">{an enumeration literal does not cause freezing if it occurs
+within an <span class="ntrm">aspect_definition</span> for the Default_Value aspect of its
+type}</span>.</li>
+</ul></li>
<li><<Was (15.2/5>>At the place where a construct causes freezing, if
the construct includes a check associated with some assertion aspect (independent of whether the
check is enabled), or depends on the definition of some operational aspect as part of its Dynamic
@@ -220,7 +225,7 @@
typically not the case because of the possibility of bypassing the current instance rule by means
of a partial view and a subtype, as in</p>
<p class="text"> </p>
-<a id="t.c711c9e162ca63b8a855ee8735fafaf3f57c4794"></a><a id="t.2"></a><table class="c26"><tr class="c5"><td class="c13">
+<a id="t.c711c9e162ca63b8a855ee8735fafaf3f57c4794"></a><a id="t.2"></a><table class="c23"><tr class="c12"><td class="c22">
<p class="codt"> <b>type</b> T <b>is</b> <b>private</b>;<br>
<b>private</b><br>
<b>subtype</b> S <b>is</b> T;<br>
@@ -257,7 +262,7 @@
<h2 class="head">!example</h2>
<p class="txts">This AI would allow the following declarations to be legal:</p>
-<a id="t.2ca453b052ff6b219ea9a7573dda84b3aee67fc7"></a><a id="t.3"></a><table class="c26"><tr class="c5"><td class="c13">
+<a id="t.fae934939e8c2de6b602a6bb51ec41e348890373"></a><a id="t.3"></a><table class="c23"><tr class="c12"><td class="c22">
<p class="codt">Nul_Pos : <b>constant</b> Integer := <br>
Character'Pos (Ada.Characters.Latin_1.NUL); -- equals 0<br>
<br>
@@ -267,7 +272,7 @@
-- Or alternatively...<br>
<br>
<b>type</b> Char2 <b>is</b> <b>new</b> Character<br>
- <b>with</b> Default_Value => Char'First;</p>
+ <b>with</b> Default_Value => Char'First;</p>
</td></tr></table><h2 class="head">!ACATS test</h2>
<p class="text">An ACATS C-Test is needed to check that these attributes are allowed for a
Default_Value aspect specification.</p>
Questions? Ask the ACAA Technical Agent