CVS difference for arm/source/11.mss

Differences between 1.87 and version 1.88
Log of other versions for file arm/source/11.mss

--- arm/source/11.mss	2012/11/28 23:53:04	1.87
+++ arm/source/11.mss	2013/02/02 01:46:59	1.88
@@ -1,10 +1,10 @@
 @Part(11, Root="ada.mss")
-@Comment{$Date: 2012/11/28 23:53:04 $}
+@Comment{$Date: 2013/02/02 01:46:59 $}
 @Comment{$Source: e:\\cvsroot/ARM/Source/11.mss,v $}
-@Comment{$Revision: 1.87 $}
+@Comment{$Revision: 1.88 $}
@@ -239,6 +239,10 @@
+@ChgAdded{Version=[4],Text=[An @SynI{exception_}@nt{name} of an
+@nt{exception_choice} shall denote an exception.]}
 @Defn2{term=<cover>, Sec=<of a choice and an exception>}
 A choice with an
 @SynI{exception_}@nt{name} @i{covers} the named exception.
@@ -348,11 +352,16 @@
       | @key{raise} @SynI{exception_}@Syn2{name} [@key{with} @SynI{string_}@Syn2{expression}];>,
 Old=<@key{raise} [@SynI{exception_}@Syn2{name}];>}"}
+@AddedSyn{Version=[4],lhs=<@Chg{Version=[4],New=<raise_expression>,Old=<>}>,rhs="@Chg{Version=[4],New=<@key{raise} @SynI{exception_}@Syn2{name} [@key{with} @SynI{string_}@Syn2{expression}]>,Old=<>}"}
-The @nt{name}, if any, in a @nt{raise_statement} shall denote
-an exception.
+@Chg{Version=[4],New=[An @SynI<exception_>@nt{name} of],Old=[The @nt{name}, if
+any, in]} a @nt{raise_statement}
+@Chg{Version=[4],New=[or @nt{raise_expression} ],Old=[]}shall denote an exception.
 @Defn{re-raise statement}
 A @nt{raise_statement} with no @SynI{exception_}@nt{name}
 (that is, a @i{re-raise statement})
@@ -362,20 +371,31 @@
-@ChgAdded{Version=[2],Text=[The @nt<expression>, if any, in a
-@nt<raise_statement>, is expected to be of type String.]}
+@SynI{string_}@nt{expression} of],Old=[The @nt<expression>, if any, in]} a
+@nt<raise_statement>@Chg{Version=[4],New=[ or @nt{raise_expression}],Old=[,]}
+is expected to be of type String.]}
+@ChgAdded{Version=[4],Text=[A @nt{raise_expression} is expected to be of
+any type.]}
 @Defn2{Term=[raise], Sec=(an exception)}
 To @i(raise an exception) is to
 raise a new occurrence of that exception@Redundant[,
 as explained in @RefSecNum{Exception Handling}].
 @PDefn2{Term=[execution], Sec=(raise_statement with an exception_name)}
 For the execution of a @nt{raise_statement} with an
-@SynI{exception_}@nt{name}, the named exception is raised.
-@Chg{Version=[2],New=[@redundant{If a @SynI<string_>@nt<expression> is present,
+@SynI{exception_}@nt{name}, the named exception is
+raised.@Chg{Version=[4],New=[ Similarly, for the evaluation of a @nt{raise_expression},
+the named exception is raised.],Old=[]}
+both of these cases, if],Old=[If]} a @SynI<string_>@nt<expression> is present,
 the @nt{expression} is evaluated and its value is associated with the
 exception occurrence.}],Old=[]}
 @PDefn2{Term=[execution], Sec=(re-raise statement)}
@@ -395,6 +415,40 @@
 Exception_Occurrence value.
 This allows the original cause of the exception to be determined.
+@ChgAdded{Version=[4],Text=[There is one exception to the above rule: For an
+individual membership test (see @RefSecNum{Relational Operators and Membership Tests})
+of the form "X @key[in] S",
+if a @nt{raise_expression} @Redundant[statically] within the predicate of S
+is evaluated, then the exception is not raised; instead, the entire predicate
+immediately evaluates to False. This includes @nt{raise_expression}s
+@Redundant[statically] within the @nt{default_expression} for a formal
+parameter used in a call @Redundant[statically] within the predicate.]}
+  @ChgRef{Version=[4],Kind=[AddedNormal]}
+  @ChgAdded{Version=[4],Text=[But it does @i<not> include @nt{raise_expression}s
+  within the @nt{default_expression} for a component; those actually raise
+  the exception.]}
+  @ChgRef{Version=[4],Kind=[AddedNormal]}
+  @ChgAdded{Version=[4],Text=[This special rule also applies to the predicate
+  check that is part of the evaluation of the Valid attribute (see @RefSecNum{The Valid Attribute}),
+  as the Valid attribute is defined in terms of a membership test.]}
+  @ChgRef{Version=[4],Kind=[AddedNormal]}
+  @ChgAdded{Version=[4],Text=[The purpose of @nt{raise_expression}s in a
+  predicate is to specify the exception to raise if the predicate fails.
+  The purpose of a membership test is to return False if the value is not
+  included in the subtype (including if the predicate fails). So we want
+  a predicate in this circumstance to return False, not to raise some
+  exception. We only make this apply to the text of the predicate so that
+  this special case doesn't hide bugs (and isn't expensive). This does mean
+  that @nt{raise_expression}s should stay directly in a predicate and not
+  be moved into functions.]}
@@ -427,6 +481,15 @@
   should encourage the use of message strings when raising exceptions.]}
+  @ChgRef{Version=[4],Kind=[AddedNormal],ARef=[AI12-0022-1],ARef=[AI12-0054-1]}
+  @ChgAdded{Version=[4],Text=[@Defn{extensions to Ada 2012}@b<Correction:>
+  The @nt{raise_expression} is new. This construct is necessary to
+  allow conversion of existing specifications to use preconditions and
+  predicates without changing the exceptions raised. It is considered important
+  enough to be added to Ada 2012 rather than waiting for Ada 202x.]}
 @LabeledClause{Exception Handling}
@@ -694,13 +757,15 @@
 @ChgAdded{Version=[2],Text=[Exception_Message returns the message associated
 with the given Exception_Occurrence. For an occurrence raised by a call to
 Raise_Exception, the message is the Message parameter passed to Raise_Exception.
-For the occurrence raised by a @nt{raise_statement} with an
+For the occurrence raised by a @nt{raise_statement}
+@Chg{Version=[4],New=[or @nt{raise_expression} ],Old=[]}with an
 @SynI{exception_}@nt{name} and a @SynI{string_}@nt{expression}, the message is
 the @Syni{string_}@nt{expression}. For the occurrence raised by a
-@nt{raise_statement} with
+@nt{raise_statement} @Chg{Version=[4],New=[or @nt{raise_expression} ],Old=[]}with
 an @Syni{exception_}@nt{name} but without a @Syni{string_}@nt{expression},
 the message is a string giving implementation-defined information about the
 exception occurrence. @Chg{Version=[3],New=[For an occurrence originally raised

Questions? Ask the ACAA Technical Agent