* [PATCH] gas: Fix x86 build with GCC 6.4
@ 2024-03-08 16:10 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-03-08 16:10 UTC (permalink / raw)
To: binutils; +Cc: indu.bhagat
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.
---
gas/config/tc-i386.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index fecb25a3fe2..532f8f58b0a 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
--
2.44.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-08 16:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 16:10 [PATCH] gas: Fix x86 build with GCC 6.4 H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).