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

LoongArch assembler fixes a build error with GCC 4.9

Gas code for LoongArch was updated to avoid a GCC 4.9 compiler error related to label placement.

This change addresses a build error encountered with GCC 4.9 on the LoongArch architecture. The assembler code in gas/config/tc-loongarch.c was modified to correctly handle label declarations within functions, preventing a compilation failure.

In Details

The md_apply_fix function in gas/config/tc-loongarch.c incorrectly placed a declaration (unsigned int subtype;) after a case label. GCC 4.9 onwards rejects this C construct. The fix moves the declaration inside a compound statement, satisfying the compiler's requirements.

Filed Under: loongarchgascompiler-error