binutils Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
aarch64

aarch64: Remove cast from struct initializer.

Fixes a GCC 4.9 compile error in aarch64 opcode definitions.

A GCC 4.9 compile error in the aarch64 opcode definitions has been fixed. The error was caused by an initializer element that was not a constant. This change removes a cast from a struct initializer in opcodes/aarch64-opc-2.c and updates the code generation in opcodes/aarch64-gen.c.

In Details

This commit addresses a compiler error in GCC 4.9 related to non-constant initializers for the aarch64_operands array in opcodes/aarch64-opc-2.c. The AARCH64_FIELD macro was incorrectly used, leading to an initializer that wasn't a compile-time constant. The fix modifies the macro (aarch64-gen.c) to produce a C struct literal with explicit boolean and integer fields, resolving the issue and ensuring compatibility with older GCC versions.

For Context
aarch64
The 64-bit ARM architecture instruction set.
opcode
A machine language instruction, represented by a symbolic name in assembly language.
struct initializer
A C language construct used to assign initial values to the members of a structure variable when it is declared.
GCC 4.9
An older version of the GNU Compiler Collection, used here as a compatibility target.
Filed Under: aarch64compiler errorGCCopcodes