public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove dead code from scalar_binop
@ 2023-03-13 12:50 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-03-13 12:50 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=349a125d16bec4a894e01494df10a2825195178e
commit 349a125d16bec4a894e01494df10a2825195178e
Author: Tom Tromey <tromey@adacore.com>
Date: Wed Mar 1 14:02:40 2023 -0700
Remove dead code from scalar_binop
scalar_binop has code for "&&" and "||", but I think this code can't
currently be run -- and, furthermore, it doesn't make sense to have
this code here, as the point of these operators is to short-circuit
evaluation.
This patch removes the dead code.
Regression tested on x86-64 Fedora 36.
Approved-by: Kevin Buettner <kevinb@redhat.com>
Diff:
---
gdb/valarith.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 4c2b44360bb..e0a3461aaa2 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1331,14 +1331,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
v = v1 ^ v2;
break;
- case BINOP_LOGICAL_AND:
- v = v1 && v2;
- break;
-
- case BINOP_LOGICAL_OR:
- v = v1 || v2;
- break;
-
case BINOP_MIN:
v = v1 < v2 ? v1 : v2;
break;
@@ -1492,14 +1484,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
v = v1 ^ v2;
break;
- case BINOP_LOGICAL_AND:
- v = v1 && v2;
- break;
-
- case BINOP_LOGICAL_OR:
- v = v1 || v2;
- break;
-
case BINOP_MIN:
v = v1 < v2 ? v1 : v2;
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-13 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 12:50 [binutils-gdb] Remove dead code from scalar_binop Tom Tromey
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).