diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-03-08 14:35:20 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2005-03-08 14:35:20 +0000 |
commit | 36e9969cac95317f057b47509cf63271bccd98b0 (patch) | |
tree | b8c229973ba4500194f9b95686edd5d45fef1e89 /gdb/c-exp.y | |
parent | 3de11b2ef2c380882c4dcf3fa980b9817d229b04 (diff) | |
download | ppe42-binutils-36e9969cac95317f057b47509cf63271bccd98b0.tar.gz ppe42-binutils-36e9969cac95317f057b47509cf63271bccd98b0.zip |
* 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.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 27d1848776..1988e93413 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -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); } ; |