From 9eaf670568f57fc78fe40d30fc89ac5b442693fb Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 19 Jul 2012 15:33:25 +0000 Subject: * ax-gdb.c (gen_expr): Handle UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE. * breakpoint.c (watchpoint_exp_is_const): Handle UNOP_CAST_TYPE, UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST. * c-exp.y (exp): Emit UNOP_MEMVAL_TYPE, UNOP_CAST_TYPE. Update for changes to UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST. Use type_exp production where appropriate. * eval.c (evaluate_subexp_standard) : New case. : Update. : New case. (evaluate_subexp_for_address) : New case. (evaluate_subexp_for_sizeof) : New case. * expprint.c (print_subexp_standard) : New case. : New case. (dump_subexp_body_standard) : Update. : New cases. * parse.c (operator_length_standard) : Update. : New cases. * stack.c (return_command): Also check for UNOP_CAST_TYPE. * std-operator.def (UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE): New constants. --- gdb/parse.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gdb/parse.c') diff --git a/gdb/parse.c b/gdb/parse.c index 529c517..1f9addf 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -910,10 +910,16 @@ operator_length_standard (const struct expression *expr, int endpos, oplen = 3; break; - case BINOP_VAL: - case UNOP_CAST: + case UNOP_CAST_TYPE: case UNOP_DYNAMIC_CAST: case UNOP_REINTERPRET_CAST: + case UNOP_MEMVAL_TYPE: + oplen = 1; + args = 2; + break; + + case BINOP_VAL: + case UNOP_CAST: case UNOP_MEMVAL: oplen = 3; args = 1; @@ -1732,8 +1738,6 @@ operator_check_standard (struct expression *exp, int pos, case OP_SCOPE: case OP_TYPE: case UNOP_CAST: - case UNOP_DYNAMIC_CAST: - case UNOP_REINTERPRET_CAST: case UNOP_MAX: case UNOP_MEMVAL: case UNOP_MIN: -- cgit v1.1