Rationale for Ada 2012
9.1.1 Incompatibilities with Ada 2005
Each incompatibility listed below gives the AI concerned
and the paragraph in the AARM which in some cases will give more information.
Where relevant, the section in this rationale where the topic is discussed
is also given. Where appropriate the incompatibilities are grouped together.
Note that this list only covers those incompatibilities
that might reasonably occur. There are a number of others which are so
unlikely that they do not seem worth mentioning.
1 — The word some
is now reserved. Programs
using it as an identifier will need to be changed. (AI-176
Adding new reserved words is a very visible incompatibility.
Six were added in Ada 95, three in Ada 2005, and now just one in Ada
2012. Perhaps this is the end of the matter. The word some
used in quantified expressions; it already was reserved in SPARK 
where it is used in quantified expressions in proof contexts.
2 — If a predefined package has additional
entities then incompatibilities can arise. Thus suppose the predefined
package Ada.Stuff has an additional entity
More added to it. Then if an Ada 2005 program
has a package P containing an entity More
then a program with a use clause for both Ada.Stuff
and P will become illegal in Ada 2012 because
the reference to More will become ambiguous.
This also applies if further overloadings of an existing entity are added.
This can be overcome by adding child packages of
course. However, adding lots of child packages can be an inconvenience
for the user and so in many cases extending a package seemed more appropriate
especially if the identifiers concerned are unlikely to have been used
The following packages have been extended with additional
entities as listed.
There are similar additions to the other containers
There are similar additions to Ada.Strings.Wide_Fixed
It seems unlikely that existing programs will be
affected by these potential incompatibilities.
3 — Membership tests are no longer allowed
as a discrete choice. This is explained in detail in Section 3.6
of the chapter on Expressions. (AI-158
4 — Allowing functions to have parameters of
all modes led to the introduction of stricter rules on aliasing. It is
possible that a program that seemed to work in Ada 2005 is illegal in
Ada 2012. See Section 4.2
of the chapter
on Structure and Visibility. (AI-144
5 — Implicit conversion is now allowed from
anonymous access types to general access types. Such conversions can
make calls ambiguous in the presence of overloading where only one call
was permitted in Ada 2005. Consider
type RT is access all T;
function F return RT;
function F return access T;
procedure B(R: RT);
and then the call
B(F); -- ambiguous in Ada 2012
The call of B
in Ada 2012 because the call could be to either function F
But in Ada 2005, the implicit conversion is not possible and so the call
has to be to the first function F
6 — It is now illegal to declare a formal abstract
subprogram whose controlling type is incomplete. This is related to various
improvements to incomplete types described in Section 4.3
of the chapter on Structure and Visibility. (AI-296
7 — The pragma Controlled
has been removed from the language. It was never implemented anyway.
8 — The package Ada.Dispatching
in Ada 2005 but has been downgraded
because of the addition of
. This is unlikely to be a problem. (AI-166
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by: