GNAT Pro 22 Release Notes ========================= We present here a few highlights of the new features in GNAT Pro 22. You can access the complete list `here `_. .. contents:: :local: Compiler -------- Ada 2022 Support ~~~~~~~~~~~~~~~~ The implementation of Ada 2022 is now finalized. See `the Ada 2022 post `_ for details. Experimental Ada Language Extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Features discussed as part of the `RFC `_ platform are being implemented as experimental extensions under the -gnatX switch. These capabilities are not meant to be used in production and could change in the future. They are here to allow for early experiment - feedback can be provided through the usual ticket mechanism. See `this post `_ for details. The following extensions are available as part of GNAT Pro 22: - Pattern Matching (generalized case statement) - Generalized Object.Method Notation for Untagged Types - Simpler, Compile-Time Accessibility Rules - Additional "when" Constructs: “return”, “goto”, “raise” - Fixed Array Lower Bounds New Attributes, Pragmas, Aspects and Restrictions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - New ‘Valid_Value attribute to avoid raising an exception when using ‘Value - The Machine_Attribute pragma now supports the “no_stack_protector” attribute, allowing the stack-smashing protection to be disabled on a per-subprogram basis - New restrictions No_Unrecognized_Aspects / No_Unrecognized_Pragmas - New No_Task_Parts aspect to allow improved code generation Warnings and Errors Reporting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Compilation messages can now be output in JSON format - Error messages are now prepended with “error:” by default - Warning messages now include the name of the option that caused the warning by default - -Werror now implies -gnatwe - Improved accuracy of existing warnings - New warning on statically known empty loops - New warning on potentially confusing operator precedence - New warning for negative literals of modular type - New warning for integer signedness mismatch in pragma Import (Intrinsics) - New warning for duplicate Size and Value_Size aspects GCC Back-End Update ~~~~~~~~~~~~~~~~~~~ The GNAT compiler has now been updated to GCC 10. See `this page `_ for the corresponding capabilities of the back-end, as well as updates to C and C++. GNAT Pro C/C++ ~~~~~~~~~~~~~~ - GNAT Pro C/C++ is now provided as a separate package from GNAT Pro Ada on all relevant platforms. - Upgrade to GCC 10: improved optimizations, support for many upcoming C2x features, improved support for C++20, and experimental support for the upcoming C++2a standard. User Experience ~~~~~~~~~~~~~~~ - Support for simple unattended installations of all our tools under Linux - Improved performance in the Ada runtime, code generation, and compilation time - Significant improvements to elementary functions - Faster sorting for doubly-linked-list containers - Many floating-point support improvements leading to more efficient and more accurate results for I/O, exponentiation, and handling of floating-point attributes. - Faster implementation of ‘Value for enumeration types - Improved code generated for fixed-point operations - Compile-time improvements - Large reduction of GNAT encodings in debug info to use standard DWARF - Improved output of C binding generation (-fdump-ada-spec) - Support for shared libraries on VxWorks 7 x86-64 and powerpc 64 - GPRls now allows browsing of projects that haven’t been built, and displaying sources in languages other than Ada. - Ada decoded type names are now provided by the debugger Python API Safety and Security ------------------- - The full Ada runtime is now built with checks enabled by default to increase its reliability in particular in a security context. - New runtimes available on all bare metal and certifiable ports: light (replaces zfp, minimal, cert), light-tasking (replaces ravenscar-sfp, ravenscar-cert). See `GNAT Pro documentation `_ for details. GNAT Dynamic Analysis Suite --------------------------- The GNAT Dynamic Analysis Suite (formerly known as GNATcoverage) now includes GNATcoverage (code coverage) and GNATtest (unit testing framework). The new features include: - Many refinements in the support of coverage via source instrumentation, in particular for expression functions and SPARK units. - Beta support for instrumentation of C sources. - Improved coverage report generation: Timezone selection and display, more consistent processing of ignored sources, improved ability to locate sources, improved display of coverage achievements, with new metrics based on coverage obligation kinds. - Streamlined coverage support for Ada 2012 If-expressions and Quantified-expressions. - GNATtest has been transitioned to Libadalang, leading to faster, more flexible, and more reliable processing and is now part of the dynamic analysis suite exclusively. - GNATtest and GNATcoverage are now better integrated. Note that GNATcoverage now relies on source-code instrumentation. All GNAT Pro platforms, included embedded ones, and all GNAT Pro versions are now supported. On the roadmap, the version 23 will include a beta release of GNATfuzz (fuzzing technology) for Linux native. Libadalang ---------- - Many API additions and fixes, see `Libadalang documentation `_ for details. - Many fixes and improvements in the name resolution and navigation engine. - Improvements to the static evaluator (‘Val attribute, relational operators) - More stable handling of dynamic source changes for long-lived applications (e.g. IDEs) Platforms --------- New Targets ~~~~~~~~~~~ The following platforms are now supported: - VxWorks 7 SR0660, 21.03, 21.07 (Ada, C and C++) - VxWorks 7 Cert SR0630 (Ada, C and C++) - Helix ARM 64 bits (Ada, C and C++) - LST MOSA.IC x86 64 bits (Ada and C) - Bare Metal x86 64 bits (Ada and C) - AVR 8 bits (C only) Platform Status Changes ~~~~~~~~~~~~~~~~~~~~~~~ The following platforms are now only available on GNAT Pro Assurance as a Sustained Branch. A Sustained Branch is a stabilized branch on the technology on which only critical fixes can be provided, suitable for high-integrity and certified application development. - x86 Lynx178 (Sustained Branches available up to GNAT Pro 21) - ARM PikeOS 4.2 (Sustained Branches available up to GNAT Pro 21) The following platforms are now Baselined. A Baselined platform is a supported platform that will no longer be updated with fixes. AdaCore can still provide advice and workarounds on the technology. - e500v2 VxWorks 6 Cert (Baseline on GNAT Pro LTS 19 2021) Component Changes ~~~~~~~~~~~~~~~~~ GNAT Pro Enterprise 21 was the last release including GNATtest and GNATcheck. Starting with 22.0, GNATtest is bundled with the GNAT Dynamic Analysis Suite (GNATcoverage component in 22). GNATtest will remain in the GNAT Pro Long-term Supported (LTS) and Assurance product branches prior to GNAT Pro 22. Starting with 23.0, GNATcheck is bundled with our Static Analysis Suite (CodePeer component). GNATcheck will remain in the GNAT Pro Long-term Supported (LTS) and Assurance product branches prior to GNAT Pro 22.