diff options
author | Tom Tromey <tromey@adacore.com> | 2023-03-01 14:02:40 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-03-13 06:31:22 -0600 |
commit | 349a125d16bec4a894e01494df10a2825195178e (patch) | |
tree | 3a1c075c995328519756cf8b247aa6dba318a6ec /gdb | |
parent | d7001b29e9f256dfc60acb481d9df8f91f2ee623 (diff) | |
download | gdb-349a125d16bec4a894e01494df10a2825195178e.zip gdb-349a125d16bec4a894e01494df10a2825195178e.tar.gz gdb-349a125d16bec4a894e01494df10a2825195178e.tar.bz2 |
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>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/valarith.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 4c2b443..e0a3461 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; |