diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-03-08 08:08:02 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-03-08 08:08:02 -0800 |
commit | 03fa0c63d3a5944afcf031ecf0b433b2985e6eeb (patch) | |
tree | 722d0e416b775b8fce175f36adcecc85de17b128 | |
parent | e9b738dfbdc504589e1a365ce32981f4b23c22c3 (diff) | |
download | gdb-03fa0c63d3a5944afcf031ecf0b433b2985e6eeb.zip gdb-03fa0c63d3a5944afcf031ecf0b433b2985e6eeb.tar.gz gdb-03fa0c63d3a5944afcf031ecf0b433b2985e6eeb.tar.bz2 |
gas: Fix x86 build with GCC 6.4
Add "()" to silence GCC 6.4:
.../gas/config/tc-i386.c: In function ‘x86_ginsn_lea’:
.../gas/config/tc-i386.c:5738:19: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
if (!i.base_reg != (!i.index_reg || i.index_reg->reg_num == RegIZ))
^~
cc1: all warnings being treated as errors
PR gas/31464
* config/tc-i386.c (x86_ginsn_lea): Add "()" to silence GCC 6.4.
-rw-r--r-- | gas/config/tc-i386.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fecb25a..532f8f5 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5735,7 +5735,7 @@ x86_ginsn_lea (const symbolS *insn_end_sym) unsigned int dst_reg; bool index_regiz_p; - if (!i.base_reg != (!i.index_reg || i.index_reg->reg_num == RegIZ)) + if ((!i.base_reg) != (!i.index_reg || i.index_reg->reg_num == RegIZ)) { /* lea disp(%base), %dst or lea disp(,%index,imm), %dst. Either index_reg or base_reg exists, but not both. Further, as per |