Rationale for Ada 2012
9.2.1 Incompatibilities with original Ada 2005
There are a small number of incompatibilities between
the original Ada 2005 and that resulting from various corrections.
1 — The rules for full conformance have been
strengthened; for example, null exclusions must now match. (
AI-46,
AI-134,
AI-207,
6.3.1)
2 — When an inherited subprogram is implemented
by a protected function, the first parameter has to be an
in parameter,
but not an access to variable type. Ada 2005 allowed access to variable
parameters in this case; the parameter will need to be changed to access
to constant by the addition of the
constant keyword. (
AI-291,
9.4)
3 — A missing rule is added that a limited
with clause cannot name an ancestor unit. (
AI-40,
10.1.2)
4 — Matching of formal access to subprogram
types uses subtype conformance in Ada 2012 whereas it only used mode
conformance in original Ada 2005. This change was necessary to avoid
undefined behaviour in some situations. (
AI-288,
12.5.4)
5 — An address attribute with a prefix of a
subprogram with convention
Intrinsic is now
illegal. This is discussed in Section
6.6
of the chapter on Iterators, Pools etc. (
AI-95,
13.3)
6 — Stream attributes must be specified by
a static subprogram name rather than by a dynamic expression. (
AI-39,
13.13.2)
7 — The use of discriminants on
Unchecked_Union
types is now illegal in record representation clauses. It makes no sense
to specify the position of something that is not supposed to exist. (
AI-26,
B.3.3)
8 — A nonvolatile generic formal derived type
precludes a volatile actual type. (
AI-218,
C.6)
9 — The restriction
No_Relative_Delay
has been extended to also prohibit a call of
Timing_Events.Set_Handler
with a
Time_Span parameter.
(
AI-211,
D.7)
10 — Various restrictions have been reworded
to prevent the bypassing of the restriction by calling the forbidden
subprogram via renames. (
AI-211,
D.7)
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by: