Skip to content
Snippets Groups Projects
Commit 349a125d authored by Tom Tromey's avatar Tom Tromey
Browse files

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: default avatarKevin Buettner <kevinb@redhat.com>
parent d7001b29
No related branches found
No related tags found
No related merge requests found
...@@ -1331,14 +1331,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) ...@@ -1331,14 +1331,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
v = v1 ^ v2; v = v1 ^ v2;
break; break;
case BINOP_LOGICAL_AND:
v = v1 && v2;
break;
case BINOP_LOGICAL_OR:
v = v1 || v2;
break;
case BINOP_MIN: case BINOP_MIN:
v = v1 < v2 ? v1 : v2; v = v1 < v2 ? v1 : v2;
break; break;
...@@ -1492,14 +1484,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) ...@@ -1492,14 +1484,6 @@ scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
v = v1 ^ v2; v = v1 ^ v2;
break; break;
case BINOP_LOGICAL_AND:
v = v1 && v2;
break;
case BINOP_LOGICAL_OR:
v = v1 || v2;
break;
case BINOP_MIN: case BINOP_MIN:
v = v1 < v2 ? v1 : v2; v = v1 < v2 ? v1 : v2;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment