This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] evaluate_subexp_standard: Remove useless assignments
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 4 Sep 2017 19:23:01 -0000
- Subject: [binutils-gdb] evaluate_subexp_standard: Remove useless assignments
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d008ee21562d9f823b3d081b9b60e86509a5e85a
commit d008ee21562d9f823b3d081b9b60e86509a5e85a
Author: Pedro Alves <palves@redhat.com>
Date: Mon Sep 4 20:21:14 2017 +0100
evaluate_subexp_standard: Remove useless assignments
gdb/ChangeLog:
2017-09-04 Pedro Alves <palves@redhat.com>
* eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
Remove useless assignments to 'op'.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/eval.c | 3 ---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2858398..2f0e8dd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-09-04 Pedro Alves <palves@redhat.com>
+ * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
+ Remove useless assignments to 'op'.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
* eval.c (eval_skip_value): New function.
(evaluate_subexp_standard): Use it.
diff --git a/gdb/eval.c b/gdb/eval.c
index 639e06e..cb41a4a 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -2493,7 +2493,6 @@ evaluate_subexp_standard (struct type *expect_type,
case UNOP_COMPLEMENT:
/* C++: check for and handle destructor names. */
- op = exp->elts[*pos].opcode;
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
@@ -2561,8 +2560,6 @@ evaluate_subexp_standard (struct type *expect_type,
case UNOP_ADDR:
/* C++: check for and handle pointer to members. */
- op = exp->elts[*pos].opcode;
-
if (noside == EVAL_SKIP)
{
evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);