GNAT Pro 26 Release Notes

We present here a few highlights of the new features in GNAT Pro 26 You can access the complete list in the GNAT Pro 26 feature file.

GCC back-end update

The GNAT Pro for Ada, C and C++ compilers have now been updated to GCC 14. See the GCC 14 changes for the corresponding capabilities as well as updates to C and C++.

GNAT Pro compilers targeting 32-bit Linux and Windows are now 64-bit executables.

LLVM back-end update

The GNAT Pro LLVM for Ada compiler has now been updated to LLVM 19. See the LLVM 19 release notes for the corresponding capabilities.

New targets

  • GNAT Pro LLVM for Ada now supports Arm 64-bit VxWorks 7, starting with release 26.1

  • GNAT Pro for Ada for Arm 64-bit bare-metal platforms now supports the Xilinx ZynqMP Arm Cortex-R5 processor

  • GNAT Pro now supports x86 64-bit cross Linux hosted on Linux

  • GNAT Pro now supports Arm 64-bit LynxOS-178 MfA 2025.08

Mixed-language applications

Improve mixed Ada/C++ support for bare-metal Ada runtimes

Bare-metal Ada runtimes support the execution of C++ global object initialization and destruction.

New System.C_Time and GNAT.C_Time run-time units

The System.C_Time and GNAT.C_Time units are now available in the run-time library units of native and selected cross platforms. They provide the time_t, timeval, and timespec types corresponding to the C types defined by the OS, as well as various conversion functions. The latter unit is a mere renaming of the former under the GNAT hierarchy.

CCG support for AArch64 target triplets

When describing the target to CCG, you can now also use AArch64 triplets like “aarch64-unknown-elf” in addition to the already supported x86 and x86_64 variants.

StdCall calling convention support in CCG

On Windows, the StdCall convention can now be specified for functions. This is usually the case for Win32 runtime functions. This calling convention, if set in Ada code, is emitted in C. The modifier can be specified by -c-target-modifier-stdcall=<modifier>, and by default is set to __stdcall on the MSVC compiler. When not specified, all functions with StdCall calling conventions will be emitted with __attribute__((stdcall)).

VxWorks

VxWorks 7 Ada Bindings

This release documents how to generate an Ada API that allows direct access to the VxWorks 7 C APIs, using h2ads.

GNATColl Support for VxWorks 7

This release includes GNATColl for all supported VxWorks 7 architectures.

LLVM capabilities

Better debug information in GNAT Pro LLVM

The LLVM back-end of the GNAT Pro for Ada compiler will emit better debug information to improve the debugging experience with GNAT Pro LLVM.

Shared Ada runtimes for Linux GNAT Pro LLVM

GNAT Pro for Linux will include shared Ada runtimes for use with the LLVM back-end.

Native GNAT Pro LLVM includes the light runtime

Native GNAT Pro LLVM now includes the light and light-tasking runtimes alongside the native one. It can be selected by passing the –RTS flag to gprbuild, or configured in the .gpr file.

Windows additions

Addition of Win32 Ada Interlocked methods

The Win32.Winbase API has been augmented with some interlocked methods based on GCC intrinsics that support 32-bit and 64-bit words.

New API routines added to Win32.Winbase

A set of new standard Win32 routines has been implemented in Win32Ada. The added set comprises OpenThread, QueryThreadCycleTime, SetFilePointerEx, GetSystemTimeAsFileTime, ReadDirectoryChangesW, CancelIo, and HasOverlappedIoCompleted.

Ada support

Extended_Access aspect

A new aspect Extended_Access has been added as a GNAT-specific extension supported by the GCC backend. This extension enables the creation of accesses to array slices, and simplifies the use of objects of unconstrained arrays when they are allocated by a foreign language.

Extension for resource management via “finally” part

A GNAT-specific extension has been added (enabled via -gnatX0) that allows a “finally” part in statement sequences, providing additional control over resource management within scopes. See the GNAT Reference Manual for details.

Optimizations

Improved allocation of iterated container aggregates

For a container aggregate of a bounded container type with a container_element_association given by an iterator_specification that iterates over a container object V (for example, “[for E of V => E]”), the compiler now determines the length of V and uses that as the size to allocate for the container aggregate. Prior to this enhancement, the compiler would typically use the default value of the Empty function’s Capacity parameter when allocating space for the aggregate, which could easily lead to Capacity_Error being raised for the aggregate. Note that this enhancement is only used for aggregates of container types coming from instantiations of the predefined bounded container generics, and not for user-defined container types, and it currently only applies when the object being iterated over is a simple object (in particular, the object is not an indexed name, selected component, explicit dereference, or function call).

More efficient Unchecked_Conversion for array types

The compiler now implements calls to instances of Unchecked_Conversion more efficiently when the target type is a large array type whose bounds are not static in the Ada sense, but can nevertheless be computed at compile time.

Improved nonlimited by-reference calls as default

The compiler generates more efficient object code for default values of record components that are a call to a function returning a result of a nonlimited by-reference type, which includes controlled and tagged types.

Improved efficiency of very large shift counts

For a call to an intrinsic shift function (Shift_Left, Shift_Right, or Shift_Right_Arithmetic), if the value is known at compile time, and the shift count is very large (for example Shift_Right(X, Amount => 10**9), where the value of X is known), the compiler would take a long time to compute the value. This change improves the compile-time speed for such computations.

Improved nonlimited by-reference calls as components

The compiler generates more efficient object code for components of aggregates that are assigned a call to a function returning a result of a nonlimited by-reference type (which includes controlled and tagged types).

Faster aggregate return for nonlimited by-reference

Simple return statements whose expression is an aggregate present in functions returning a nonlimited by-reference type no longer incur a copy operation.

Improved nonlimited by-reference calls in allocators

The compiler generates more efficient object code for allocators whose qualified expression is a call to a function returning a result of a nonlimited by-reference type, which includes controlled and tagged types.