CVS difference for ai22s/ai22-0045-1.html
--- ai22s/ai22-0045-1.html 2022/09/07 03:40:20 1.3
+++ ai22s/ai22-0045-1.html 2022/09/10 09:05:14 1.4
@@ -1,15 +1,15 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0045-1/02</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0045-1/03</title>
<style type="text/css">
table td,table th{padding:0}
-.c26{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}
-.c16{border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c25{text-decoration-skip-ink:none;-webkit-text-decoration-skip:none;text-decoration:underline}
-.c2{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c24{color:inherit;text-decoration:inherit}
-.c18{border:1px solid black;margin:5px}
-.c6{color:#999999}
-.c19{color:#006600}
-.c34{height:0pt}
+.c33{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}
+.c29{border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c43{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c21{-webkit-text-decoration-skip:none;text-decoration:underline;text-decoration-skip-ink:none}
+.c22{border:1px solid black;margin:5px}
+.c11{color:inherit;text-decoration:inherit}
+.c3{color:#999999}
+.c24{color:#006600}
+.c5{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}
@@ -23,28 +23,31 @@
SPAN.ins{color:#005500}
SPAN.del{color:#880000}
SPAN.ntrm{font-family:"Arial","Liberation Sans",sans-serif}
-SPAN.a4{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline; color:#006600}
-P.a9{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.15; page-break-after:avoid; orphans:2; widows:2; text-align
:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
-SPAN.a34{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline; color:#1155cc}
-SPAN.a51{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline;font-family:"Arial","Liberation Sans",sans-serif; color:#999999}
-SPAN.a52{color:#666666}
-SPAN.a53{font-family:"Arial","Liberation Sans",sans-serif; color:#888888}
-SPAN.a54{font-family:"Arial","Liberation Sans",sans-serif; font-style:italic}
-SPAN.a55{font-family:"Arial","Liberation Sans",sans-serif; color:#b7b7b7}
-SPAN.a56{font-family:"Arial","Liberation Sans",sans-serif; color:#999999}
-SPAN.a57{color:#999999}
-SPAN.a58{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline;font-family:"Arial","Liberation Sans",sans-serif}
-SPAN.a59{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline}
-P.a60{margin-bottom:0; margin-top:0; margin-left:42pt; margin-right:0; color:#000000; font-size:11pt; font-family:"Times New Roman","Times",serif; padding-top:0pt; padding-bottom:20pt; line-height:1.330909090909091; orphans:2; widows:2; text-align:left; t
ext-decoration:none; vertical-align:baseline; font-style:normal; font-weight:400}
+SPAN.a3{-webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none; color:#006600}
+P.a8{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.15; page-break-after:avoid; orphans:2; widows:2; text-align
:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+SPAN.a34{-webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none; color:#1155cc}
+SPAN.a52{font-family:"Arial","Liberation Sans",sans-serif; color:#999999; -webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none}
+SPAN.a53{color:#666666}
+SPAN.a54{font-family:"Arial","Liberation Sans",sans-serif; color:#888888}
+SPAN.a55{font-family:"Arial","Liberation Sans",sans-serif; font-style:italic}
+SPAN.a56{font-family:"Arial","Liberation Sans",sans-serif; color:#b7b7b7}
+SPAN.a57{font-family:"Arial","Liberation Sans",sans-serif; color:#999999}
+SPAN.a58{color:#999999}
+SPAN.a59{-webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none;font-family:"Arial","Liberation Sans",sans-serif}
+SPAN.a60{-webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none}
+P.a61{margin-bottom:0; margin-top:0; margin-left:42pt; margin-right:0; color:#000000; font-size:11pt; font-family:"Times New Roman","Times",serif; padding-top:0pt; padding-bottom:20pt; line-height:1.330909090909091; orphans:2; widows:2; text-align:left; f
ont-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+P.a62{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; color:#006600; font-size:11pt; font-family:"Arial","Liberation Sans",sans-serif; padding-top:0pt; padding-bottom:13pt; line-height:1.15; orphans:2; widows:2; text-align:left; height:11pt;
-webkit-text-decoration-skip:none; text-decoration:underline; text-decoration-skip-ink:none; font-weight:400; vertical-align:baseline; font-style:normal}
</style>
-</head><body class="c2 doc-content"><p class="a9">AI22-0045-1</p>
+</head><body class="c43 doc-content"><p class="a8">AI22-0045-1</p>
<p class="head">!standard 2.8(6/5)
- 22-08-30 AI22-0045-1/02</p>
+ 22-09-09 AI22-0045-1/03</p>
<p class="head">!standard 2.8(7/3)</p>
<p class="head">!standard 2.8(7.1/3)</p>
<p class="head">!standard 2.8(7.2/3)</p>
<p class="head">!standard 2.8(12)</p>
<p class="head">!class binding interpretation 22-06-16</p>
+<p class="head">!status Corrigendum 1-2022 22-09-09</p>
+<p class="head">!status ARG Approved 10-0-0 22-09-09</p>
<p class="head">!status work item 22-06-16</p>
<p class="head">!status received 22-03-22</p>
<p class="head">!priority Medium</p>
@@ -60,9 +63,9 @@
<p class="word"><span class="ntrm">Pragma</span>s are only allowed at the following places in a
program: </p>
<p class="wind">6/5 After a semicolon delimiter, but not within a
-<span class="ntrm">fo</span><span class="ntrm">rmal_part</span><span class="c25">,
-</span><span class="a58">discriminant_part</span><span class="a59">, or
-</span><span class="a58">declare_expression</span>.</p>
+<span class="ntrm">fo</span><span class="ntrm">rmal_part</span><span class="c21">,
+</span><span class="a59">discriminant_part</span><span class="a60">, or
+</span><span class="a59">declare_expression</span>.</p>
<p class="wind">7/3 At any place where the syntax rules allow a
construct defined by a syntactic category whose name ends with
“<span class="ntrm">declaration</span>”, “<span class="ntrm">item</span>”,
@@ -117,7 +120,7 @@
<p class="text">For example, 2.8(7/3) allows a pragma at the place of an _alternative; this allows
a pragma at the head of a case statement:</p>
<p class="text"> </p>
-<a id="t.024f980dd1c2e583552258bb124aff053df8ef8b"></a><a id="t.0"></a><table class="c16"><tr class="c34"><td class="c26">
+<a id="t.024f980dd1c2e583552258bb124aff053df8ef8b"></a><a id="t.0"></a><table class="c29"><tr class="c5"><td class="c33">
<p class="codt"><b>case</b> P <b>is</b><br>
<b>pragma</b> Assert (...) -- (1)<br>
<b>when</b> 1 => ... -- (2)<br>
@@ -146,22 +149,22 @@
kinds of pragmas (as mentioned in (2) above), and then indicate that the Assert pragma is an
executable pragma as is an Inspection_Point pragma.</p>
-<p class="text">For (4), we permit pragmas within declare expressions, but allow implementations to
-ignore pragmas that are not executable (pragma Assert and pragma Inspection_Point are the only
-language-defined executable pragmas).</p>
+<p class="text">For (4), we permit executable pragmas within declare expressions (pragma Assert and
+pragma Inspection_Point are the only language-defined executable pragmas).</p>
<h2 class="head">!wording</h2>
-<p class="inst">[Author's NOTE: I have <span class="c6">grayed out</span> the parts of the
+<p class="inst">[Author's NOTE: I have <span class="c3">grayed out</span> the parts of the
RM wording that are proposed to be deleted, to ease reading. Does it
help?]<sup><a href="#cmnt1">[a]</a></sup></p>
<p class="inst">Modify 2.8(5-8) as follows:</p>
-<p class="word"><span class="ins">{There are five kinds of pragmas: configuration pragmas, context
-pragmas, aspect-related pragmas, executable pragmas, and control pragmas, and each has its own
-placement restrictions:</span></p>
+<p class="word"><span class="ins">{There are five kinds of pragmas: configuration pragmas (and
+pragmas usable as configuration pragmas), context pragmas, aspect-related pragmas, executable
+pragmas, and control pragmas, and each has its own placement restrictions:</span></p>
<ul class="wbl"><li>A <i>configuration</i> pragma is allowed at the beginning of a compilation,
-preceded only by other pragmas. In addition, certain pragmas usable as configuration pragmas
-can also control configuration more locally, and as such can appear immediately within a
-<span class="ntrm">declarative_part</span> or a <span class="ntrm">package_specification </span>at
-the place of a <span class="ntrm">basic_declaration</span>, as defined for specific pragmas.</li>
+preceded only by other pragmas. In addition, certain pragmas are <i>usable as configuration
+pragmas, and </i>can also control configuration more locally;as such these pragmas can appear
+immediately within a <span class="ntrm">declarative_part</span> or a
+<span class="ntrm">package_specification </span>at the place of a
+<span class="ntrm">basic_declaration</span>, as defined for specific pragmas.</li>
<li>A <i>context</i> pragma is allowed at the place of a <span class="ntrm">use_clause</span> in a
<span class="ntrm">context_clause.</span> </li>
<li>An <i>aspect-related</i> pragma is allowed in place of an
@@ -172,12 +175,13 @@
<span class="ntrm">basic_declaration</span> or a <span class="ntrm">declare_item</span>.
</li>
<li>A <i>control</i> pragma is allowed any place where any other kind of pragma is permitted, and
-in addition is <span class="del">[<span class="a55">Pragma</span><span class="c6">s are
+in addition is <span class="del">[<span class="a56">Pragma</span><span class="c3">s are
only</span>]</span> allowed at the following places in a program: </li>
+
<ul class="wbl"><li>After a semicolon delimiter, but not within a
-<span class="ntrm">formal_part</span><span class="a4">[</span><span class="c6">,</span><span class="c19">]
-</span>{or} <span class="ntrm">discriminant_part</span><span class="c19">[</span><span class="c6">,
-or </span><span class="a56">declare_expression</span>].</li>
+<span class="ntrm">formal_part</span><span class="a3">[</span><span class="c3">,</span><span class="c24">]
+</span>{or} <span class="ntrm">discriminant_part</span><span class="c24">[</span><span class="c3">,
+or </span><span class="a57">declare_expression</span>].</li>
<li>At any place where the syntax rules allow a construct defined by a syntactic category whose
name ends with “<span class="ntrm">declaration</span>”,
“<span class="ntrm">item</span>”, “<span class="ntrm">statement</span>”,
@@ -186,14 +190,13 @@
<span class="ntrm">variant</span> or <span class="ntrm">exception_handler</span>; but not in place
of such a construct if the construct is required, or is part of a list that is required to have at
least one such construct. [</li>
-<li><span class="c6">In place of a
-</span><span class="c6"><a class="c24" href="http://www.ada-auth.org/standards/2xaarm/html/AA-5-1.html#S0167">statement</a></span><span class="c6">
-in a </span><span class="a56">sequence_of_statements</span><span class="a57">.</span></li>
-<li><span class="c6">At any place where a
-</span><span class="a56">compilation_unit</span><span class="c6"> is allowed.</span>]</li>
-</ul>
-</ul>
-<p class="a60">Additional syntax rules and placement restrictions exist for specific pragmas. </p>
+<li><span class="c3">In place of a
+</span><span class="c3"><a class="c11" href="http://www.ada-auth.org/standards/2xaarm/html/AA-5-1.html#S0167">statement</a></span><span class="c3">
+in a </span><span class="a57">sequence_of_statements</span><span class="a58">.</span></li>
+<li><span class="c3">At any place where a
+</span><span class="a57">compilation_unit</span><span class="c3"> is allowed.</span>]</li>
+</ul></ul>
+<p class="a61">Additional syntax rules and placement restrictions exist for specific pragmas. </p>
<p class="inst">Modify 2.8(12): (Note: This includes the approved modification of
@@ -201,25 +204,29 @@
AI22-0013-2, which is not yet in any
published draft).</p>
-<p class="wrds">An<span class="del">[<span class="c6">y</span>]</span>
+<p class="wrds">An<span class="del">[<span class="c3">y</span>]</span>
<span class="ins">{executable or aspect-related}</span> pragma that appears
-<span class="del">[<span class="c6">at the</span>]</span><span class="ins">{in}</span> place of an
+<span class="del">[<span class="c3">at the</span>]</span><span class="ins">{in}</span> place of an
executable construct is executed<span class="ins">{, and is treated for the purposes of other rules
of the language as being a <span class="ntrm">simple_statement, basic_declarative_item</span>, or
<span class="ntrm">declare_item </span>according to where it appears}</span>. Unless otherwise
specified for a particular pragma, this execution consists of the evaluation of each evaluable
pragma argument in an arbitrary order.</p>
-<p class="inst">Add after 2.8(15):</p>
-<p class="wrds">An implementation may ignore a non-executable pragma within a
-<span class="ntrm">declare_expression</span>.</p>
-<p class="wrds">AARM note: This is simply to ease implementation. A warning should be
-provided.</p>
<p class="inst">Modify 2.8(20):</p>
-<p class="word">The forms of <span class="ins">{the}</span> List, Page, and Optimize
+<p class="wrds">The forms of <span class="ins">{the}</span> List, Page, and Optimize
<span class="ins">{<i>control</i>}</span> <span class="ntrm">pragma</span>s are as follows:</p>
+
+<p class="inst">Modify 4.5.9(7/5):</p>
+<p class="wrds">The following are not allowed within a
+<span class="ntrm">declare_expression</span><span class="ntrm">:</span> a declaration containing
+the reserved word <b>aliased</b>; the <span class="ntrm">attribute_designator</span> Access or
+Unchecked_Access; an anonymous access type<span class="ins">{; or a pragma other than an executable
+pragma (see 2.8)}</span>.</p>
+
+
<p class="inst">Modify 10.2.1(23):</p>
<p class="word">A <span class="ntrm">pragma</span> Elaborate or Elaborate_All <span class="ins">{is
a <i>context</i> pragma (see 2.8)[Redundant:, and}</span> is only allowed within a
@@ -227,9 +234,9 @@
<p class="inst">Modify 11.4.2(4/2):</p>
<p class="word">A <span class="ntrm">pragma</span> Assert <span class="ins">{is an
<i>executable</i> pragma (see 2.8)[Redundant:, and}</span> is allowed at the place where a
-<span class="del">[<span class="a51"><a class="c24" href="http://www.ada-auth.org/standards/2xaarm/html/AA-3-11.html#S0087">declarative_item</a></span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
+<span class="del">[<span class="a52"><a class="c11" href="http://www.ada-auth.org/standards/2xaarm/html/AA-3-11.html#S0087">declarative_item</a></span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
<span class="ntrm">declare_item</span>,}</span> or
-<span class="del">[<span class="a52">a</span>]</span>
+<span class="del">[<span class="a53">a</span>]</span>
<span class="ntrm">statement</span><span class="ntrm"> </span>is
allowed<span class="ins">{]}</span>.</p>
<p class="inst">Modify 13.1(4/1):</p>
@@ -240,11 +247,11 @@
<p class="inst">Modify H.3.2(4):</p>
<p class="word">A pragma Inspection_Point<span class="ins">{is an <i>execu</i><i>table</i> pragma
(see 2.8)[Redundant:, and}</span> is allowed wherever a
-<span class="del">[<span class="a53">declarative_item</span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
+<span class="del">[<span class="a54">declarative_item</span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
<span class="ntrm">declare_item</span>,}</span> or
<span class="ntrm">statement</span><span class="ntrm"> </span>is
allowed<span class="ins">{]}</span>. Each
-<i>object</i><span class="a54">_</span><span class="ntrm">name</span> shall statically denote the
+<i>object</i><span class="a55">_</span><span class="ntrm">name</span> shall statically denote the
declaration of an object. </p>
<p class="inst">Modify J.15(1/3):</p>
<p class="word">Pragmas can be used as an alternative to
@@ -298,20 +305,20 @@
moved the special placement rules for pragma Assert and Inspection_Point to 2.8, but we leave
behind redundant versions of them.</p>
-<p class="txts">For (4), we choose to allow pragmas in declare_expressions, but permit
-implementations to ignore (with a warning, presumably) anything but executable pragmas. </p>
+<p class="txts">For (4), we choose to allow executable pragmas in declare_expressions, but do not
+allow other kinds of pragmas. </p>
<p class="txts">The intent of all of the rules surrounding declare expressions was to keep the
implementation extremely simple, and to allow an entire expression to be the smallest unit of
change in a compiler. Changing properties in the middle of an expression could be problematic for
some implementations, and it did not seem important enough of a capability to require
-implementation to change their basic design.</p>
+implementations to change their basic design.</p>
<p class="txts">For example, how important is it to allow the specification of pragma Suppress and
(especially, since it cannot be ignored) pragma Unsuppress in the middle of an expression? Consider
this:</p>
-<a id="t.a96c388e7f2a605d95fd8ae0714da66c1e098d80"></a><a id="t.1"></a><table class="c16"><tr class="c34"><td class="c26">
+<a id="t.a96c388e7f2a605d95fd8ae0714da66c1e098d80"></a><a id="t.1"></a><table class="c29"><tr class="c5"><td class="c33">
<p class="codt"><b>procedure</b> P <b>is</b><br>
<b>pragma</b> Suppress (All_Checks);<br>
<b>begin</b><br>
@@ -328,10 +335,16 @@
this example to work. (Similar issues apply to other pragmas that affect global settings, such as
Optimize.)</p>
-<p class="text">These sorts of expressions were designed to be used in assertions like predicates
+<p class="txts">These sorts of expressions were designed to be used in assertions like predicates
and preconditions. Those are not even evaluated where they are declared, so one would have to be
able to defer the effect of a pragma until some later point. For some pragmas, that would be a new
capability.</p>
+
+<p class="text">For all of these reasons, we only allow executable pragmas (whose effects are
+well-defined) in declare_expressions. We considered allowing implementations to support other
+pragmas, but that would add another potential portability gotcha for little actual capability, so
+we do not allow other pragmas at
+all.<sup><a href="#cmnt2">[b]</a></sup><sup><a href="#cmnt3">[c]</a></sup></p>
<h2 class="head">!examples</h2>
<p class="text">(See Issue and Discussion.)</p>
<h2 class="head">!ACATS test</h2>
@@ -339,14 +352,18 @@
<h2 class="head">!appendix</h2>
<p class="txts">This AI in partially in response to ARG Github Issues #7
-(<span class="a34"><a class="c24" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7</a></span>)
+(<span class="a34"><a class="c11" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7</a></span>)
and #9
-(<span class="a34"><a class="c24" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9</a></span>).</p>
+(<span class="a34"><a class="c11" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9</a></span>).</p>
<p class="txts">*********************************************************</p>
-<div class="c18"><p class="text"><a href="#cmnt_ref1">[a]</a>The HTML converter automatically puts
+<div class="c22"><p class="text"><a href="#cmnt_ref1">[a]</a>The HTML converter automatically puts
deletions in dark red and insertions in dark green (and I've found several errors in AIs
because of this). Doing this by hand as you did however disables that capability and also
eliminates the check for errors that the automated conversion implies.</p>
+</div><div class="c22"><p class="text"><a href="#cmnt_ref2">[b]</a>I updated the discussion to
+reflect the new rule that only allows executable pragmas.</p>
+</div><div class="c22"><p class="text"><a href="#cmnt_ref3">[c]</a>We forgot to do that at the
+meeting when this was approved.</p>
</div></body></html>
Questions? Ask the ACAA Technical Agent