From a2f402895ab87713882adf2faef6f587d6d01264 Mon Sep 17 00:00:00 2001
From: Fernando Oleo Blanco
-gnat2022
flag to indicate strict Ada
+ 2022 compliance. The old -gnat2020
flag is now
+ deprecated.parallel
keyword. However, some initial support has
+ already been put in place.with Static
aspect and can be used in more
+ contexts.-gnatX
flag is
+ necessary to access these features as they are not considered
+ stable or standard.
+ type Matrix is array (Natural range 0 .. <>, Natural
+ range 0 .. <>) of Integer;
is now valid.subtype
+ String_1 is String (1 .. <>);
. Boundaries from slices
+ will "slide" to the correct lower bound of the subtype.Object.Operand
notation. The follwing
+ code is now valid V.Add_Element(42);
,
+ with V
being a vector, for example.when
constructs. Keywords
+ return
, goto
and raise
+ can now use when
in addition to the existing
+ exit when
. The following expression is therefore
+ now valid raise Constraint_Error with "Element is null"
+ when Element = null;
case
statement has been extended to cover
+ records and arrays as well as finer grained casing on scalar
+ types. In the future it is expected to provide more compile
+ time guarantees when accessing discriminated fields. Case
+ exhaustion is supported for patter matching. An example would
+ be
+type Sign is (Neg, Zero, Pos);
+
+function Multiply (S1, S2 : Sign) return Sign is
+ (case (S1, S2) is
+ when (Neg, Neg) | (Pos, Pos) => Pos,
+ when (Zero, <>) | (<>, Zero) => Zero,
+ when (Neg, Pos) | (Pos, Neg) => Neg);
+
gnatfind
and gnatxref
, which were
+ already deprecated, have been removed.128bit
integers has beed added.Pure
+ functions.