FRIDAY, JULY 17, 2026
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.