Fix build error in gas/config/tc-sh.c
Corrects a build error in the SH target's assembler configuration by changing a boolean literal from an integer to a proper boolean type.
This patch fixes a build error encountered when compiling binutils for the SH4 target with the sh4-unknown-elf configuration. The error occurred in gas/config/tc-sh.c due to an incorrect type for a boolean flag, which has been corrected to use true instead of 1.
- proposer
Submits a patch to fix a build error in `gas/config/tc-sh.c` for the SH4 target by changing `1` to `true` for a boolean assignment.
“seg_info (now_seg)->tc_segment_info_data.in_code = true;”
In Details
The change modifies gas/config/tc-sh.c, specifically the seg_info structure, to correct a type mismatch. The in_code member, likely a boolean, was being assigned an integer 1 instead of the boolean literal true, causing a build failure in certain configurations like sh4-unknown-elf.
- gas
- The GNU Assembler, part of the GNU Binutils package.
- SH4
- A specific microarchitecture from the SuperH RISC architecture family.
- tc-sh.c
- Configuration file for the SuperH architecture within the GNU Assembler.
- boolean literal
- A value representing true or false, typically written as
trueorfalsein C++ and other languages, or1and0in C.