evaluate_subexp_standard: Remove useless assignments
authorPedro Alves <palves@redhat.com>
Mon, 4 Sep 2017 19:21:14 +0000 (20:21 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 4 Sep 2017 19:21:14 +0000 (20:21 +0100)
gdb/ChangeLog:
2017-09-04  Pedro Alves  <palves@redhat.com>

* eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
Remove useless assignments to 'op'.

gdb/ChangeLog
gdb/eval.c

index 2858398..2f0e8dd 100644 (file)
@@ -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.
 
index 639e06e..cb41a4a 100644 (file)
@@ -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);