========================= GNAT 23 NEW FEATURES LIST ========================= Copyright (C) 2021, AdaCore This file contains a complete list of new features in version 23 of GNAT. A full description of all GNAT features can be found in the GNAT User's Guide and GNAT Reference Manual. An ISO date (YYYY-MM-DD) appears in parentheses after the description line. This date shows the implementation date of the feature. Any 23.0w wavefront subsequent to this date will contain the indicated feature, as will any subsequent 23 or later release. NF-UA11-002 New generic functions in System.Atomic_Primitives (2021-10-12) The System.Atomic_Primitives package now contains a generic version of its functions to be instantiated on modular types. NF-UA06-040 Warn on unused variable in quantified subexpression (2021-10-11) It is common that a quantified expression takes the form of a conjunction or disjunction. In such a case, it is expected that all conjuncts/disjuncts reference the quantified variable. Not doing so can be either the symptom of an error, or of a suboptimal expression, as that subexpression could be extracted from the quantified expression. This is beneficial for both execution (speed) and for proof (automation). A warning is now issued in such a case. NF-UA05-029 Better error messages for dot notation in calls (2021-11-12) GNAT issues better error messages when dot notation is used incorrectly, whether it is because the prefix is a generic package (instead of an instantiation of the generic) or because the object is not tagged (but using -gnatX would make the use of dot notation legal). NF-U916-043 Extend -gnatX support for casing on composite values (2021-10-20) GNAT supports case statements that case on composite values as a GNAT-defined language extension. Certain subcomponent types that were previously disallowed for such a composite type are now allowed, but subject to a restriction that the value of such a subcomponent can only be specified in a case choice via a "box" (<>) component value. This includes subcomponent types that are not discrete, record, or array types (for example, private types), subtypes that are subject to a nonstatic constraint or to a predicate, and subtypes of array types that have a nonstatic index subtype or that are multidimensional. NF-U903-027 New warning on differing subtypes that fully conform (2021-10-12) A warning is now issued when a subprogram has corresponding formal parameter or result subtype_marks that fully conform between the subprogram's declaration and body but the denoted subtypes come from different subtype declarations. This warning is enabled with -gnatw_p, a new switch that is intended to cover "pedantic" checks (and which currently only includes this one check case). NF-U521-003 New restriction No_Tagged_Type_Registration (2021-12-04) A new restriction, No_Tagged_Type_Registration, is now supported that disallows use of class-wide streaming operations and operations in Ada.Tags. It also allows restriction No_Elaboration_Code in the presence of tagged types, which in turn allows the compiler to avoid elaboration code in some cases when pragma Elaborate_Body is also used. NF-U504-045 Expression defaults for generic formal functions (2021-11-18) As a language extension, the default for a generic formal function can now be specified by an expression, using syntax analogous to an expression function (for example, "with function F (Obj : T) return T is (Obj)"). This feature is enabled by using the switch -gnatX or pragma Extensions_Allowed. NF-U421-012 Better support for link-time optimization (2021-09-30) The declaration of some runtime symbols was changed in order to better support LTO. NF-S821-017 Ada 2022: Class-wide types and formal subprograms (2021-10-19) Ada 2022 specifies that when the controlling type of a formal abstract subprogram declaration is a formal type, and the actual type is a class-wide type T'Class, the actual subprogram can be an implicitly declared subprogram corresponding to a primitive operation of type T. This feature is documented in AI12-0165-1. NF-RA02-062 New "task apply" command in debugger (2021-11-01) The debugger has a new command, "task apply". This is an Ada task analogue of the existing "thread apply" command.