Use first_opcode in another spot
authorTom Tromey <tromey@adacore.com>
Mon, 19 Dec 2022 18:15:55 +0000 (11:15 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 4 Jan 2023 16:47:10 +0000 (09:47 -0700)
I found one place that could use expression::first_opcode.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
gdb/printcmd.c

index 13b979c3720c31b5dc237eb61aa0978b56edfdf7..c3c2e5ad612ee25d909812e1ee173ea489b139ea 100644 (file)
@@ -1500,7 +1500,7 @@ set_command (const char *exp, int from_tty)
 {
   expression_up expr = parse_expression (exp);
 
-  switch (expr->op->opcode ())
+  switch (expr->first_opcode ())
     {
     case UNOP_PREINCREMENT:
     case UNOP_POSTINCREMENT: