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

A68: Fix diagnostic strings in a68_attr_format_token

GCC's Algol 68 frontend now correctly uses descriptive text for attribute diagnostics, fixing a bug that showed keyword-related messages instead.

This commit fixes an issue in the Algol 68 frontend where the a68_attr_format_token class used inappropriate diagnostic messages. Previously, it incorrectly retrieved diagnostic strings from a68_find_keyword_from_attribute, leading to misleading error messages. The fix changes it to use a68_attribute_name to provide the intended descriptive text for attributes, improving the clarity of compiler diagnostics for Algol 68 code.

In Details

The a68_attr_format_token class, found in gcc/algol68/a68-pretty-print.h, is responsible for formatting attribute-related tokens for diagnostics. This change corrects a bug where it was mistakenly using a68_find_keyword_from_attribute for diagnostic messages, which provides keyword-specific text rather than attribute descriptions. By switching to a68_attribute_name, the compiler now generates accurate and helpful messages specific to the Algol 68 attribute in question, enhancing the precision of its diagnostic output.

For Context

This update addresses a problem in the Algol 68 component of GCC, the GNU Compiler Collection. Compilers often give 'diagnostics'—error or warning messages—to help developers fix issues in their code. In Algol 68, code can have 'attributes,' which are special markers that provide additional information about a program element. The GCC component that processes these attributes was generating confusing diagnostic messages because it was pulling the wrong descriptive text. This fix ensures that when the compiler reports an issue related to an Algol 68 attribute, the message will accurately describe the attribute itself, making it clearer for developers to understand and correct their code.

Filed Under: algol68diagnosticsbugfix