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

Fixes Put_Image attribute_definition_clause being incorrectly ignored

The compiler was ignoring `Put_Image` aspect specifications defined using `attribute_definition_clause` syntax, now fixed.

This commit fixes an issue in the Ada compiler where Put_Image aspect specifications defined using the attribute_definition_clause syntax were being incorrectly ignored. The fix modifies the call to Find_Aspect in aspects.adb to correctly handle these specifications.

In Details

The fix involves a change to the Has_Aspect function in aspects.adb. The Or_Rep_Item parameter in the call to Find_Aspect was defaulting to False, causing the aspect specification to be ignored when defined via attribute_definition_clause. Setting it to True resolves the issue.

For Context

In Ada, aspects are used to specify additional properties or characteristics of types and other entities. Put_Image is an aspect related to converting a value to a string representation. This commit fixes a bug where the compiler wasn't recognizing the Put_Image aspect when it was defined using a specific syntax (attribute_definition_clause), leading to incorrect code generation or errors. The fix ensures that the compiler correctly processes these aspect specifications.

Filed Under: adabugfixaspects