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

a68: Prevent null DECL_NAMEs for TYPE_DECLs

Algol68 frontend prevents generating TYPE_DECLs with null DECL_NAMEs, fixing issues with anonymous struct/union types.

The Algol68 frontend has been corrected to avoid generating TYPE_DECLs with null DECL_NAMEs in a68-low-moids.cc. This resolves an issue where struct and union types were being emitted with invalid names, aligning with Algol 68’s handling of anonymous types until explicitly named.

In Details

The Algol68 low-level lowering pass (a68-low-moids.cc) previously generated TYPE_DECLs with null DECL_NAMEs for anonymous struct and union modes. This commit removes the build_stub_type_decl function and modifies lower_struct_mode and lower_union_mode to prevent this invalid state, ensuring that anonymous Algol 68 modes are handled correctly until they are assigned names.

For Context
TYPE_DECL
A GCC internal representation node indicating a declaration of a type.
DECL_NAME
The name associated with a declaration node in GCC's internal representation.
Algol 68
A high-level programming language known for its powerful type system and declarative features, influencing many later languages.
struct mode
In the context of Algol 68 and its compiler frontend, a 'mode' representing a structure or record type.
union mode
In the context of Algol 68 and its compiler frontend, a 'mode' representing a union type.
Filed Under: algol68compiler frontendinternal representation