GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
a68

a68: Replace A68_GLOBAL_CONTEXT with a68_range_context

Algol68 compiler refactors context handling, removing global context in favor of range context.

The Algol68 compiler frontend has refactored its context management by removing the A68_GLOBAL_CONTEXT macro and associated get_global_context function. These have been replaced by the more language-specific a68_range_context function. This change corrects an issue where the builtin initialization was incorrectly using the global context through the pushdecl function, ensuring a more accurate and consistent handling of contexts during compilation.

In Details

This commit removes the global context mechanism (A68_GLOBAL_CONTEXT and get_global_context) from the Algol68 language frontend in GCC. It replaces its usage within pushdecl with a68_range_context. The global context was deemed potentially incorrect for builtin initialization, which now correctly uses the range-specific context provided by a68_range_context. This refactoring aligns context management more closely with the language's scoping rules.

For Context
Algol68
A high-level programming language known for its powerful features and complex syntax, which had a dedicated frontend within GCC.
context management
The process of tracking and managing symbol tables, scopes, and other relevant information during the compilation of a program.
builtin initialization
The process of setting up built-in functions, types, or variables provided by the language or compiler before user code is processed.
pushdecl
Likely a function within the compiler that pushes a declaration onto the current scope's symbol table.
Filed Under: algol68refactorcompiler frontend