forked from Imagelibrary/binutils-gdb
* ax-gdb.c (gen_expr): Add UNOP_PLUS case.
* c-exp.y (exp): Add unary plus. * eval.c (evaluate_subexp_standard): Add UNOP_PLUS case. * valarith.c (value_x_unop): Add UNOP_PLUS case. (value_pos): New. * value.h (value_pos): Declare. * gdb.cp/userdef.cc (A1::operator+): New unary plus. (A2): New class. (main): Test operator+. * gdb.cp/userdef.exp: Test unary plus. Use A2::operator+ for breakpoint test.
This commit is contained in:
@@ -256,6 +256,10 @@ exp : '-' exp %prec UNARY
|
||||
{ write_exp_elt_opcode (UNOP_NEG); }
|
||||
;
|
||||
|
||||
exp : '+' exp %prec UNARY
|
||||
{ write_exp_elt_opcode (UNOP_PLUS); }
|
||||
;
|
||||
|
||||
exp : '!' exp %prec UNARY
|
||||
{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user