GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Make "finally" a non-reserved keyword when using GNAT extensions.

The keyword "finally" can now be used as an identifier when GNAT extensions are enabled.

This commit modifies the Ada compiler to allow the word “finally” to be used as an identifier when GNAT extensions are enabled. This change does not introduce any syntax ambiguities and does not affect the “finally” syntax extension itself. Making “finally” a non-reserved keyword provides more flexibility in naming variables and other program entities.

In Details

This commit affects the lexical analysis and parsing stages of the Ada compiler. The changes involve modifying the keyword tables in snames.ads-tmpl, snames.adb-tmpl, scans.adb, and par-util.adb to remove the concept of GNAT extension reserved words. The P_Sequence_Of_Statements function in par-ch5.adb is also updated to handle the "finally" syntax extension. This change allows developers using GNAT extensions to use "finally" as an identifier, providing more flexibility without affecting the core language syntax.

For Context

In programming languages, certain words are reserved for special purposes and cannot be used as variable names or identifiers. The Ada compiler has been updated to allow the word "finally" to be used as an identifier when using GNAT extensions, which are extra features added to the Ada language by the GNAT compiler. This change gives programmers more flexibility in naming their variables while still preserving the special meaning of "finally" when it's used in its intended context.

Filed Under: adaGNAT extensionskeywords