PR exp/13206:
authorTom Tromey <tromey@redhat.com>
Thu, 19 Jul 2012 15:38:18 +0000 (15:38 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 19 Jul 2012 15:38:18 +0000 (15:38 +0000)
commit608b49672edd92191a25a2c365def9d2f4f51db7
tree0ecad22ba0bdc2504d989da1742810ccc34a69b0
parent274b54d7e28ed7bb6c03c9d3a27b43151548b8af
PR exp/13206:
* ax-gdb.c (gen_expr) <OP_TYPEOF, OP_DECLTYPE>: New cases.
* breakpoint.c (watchpoint_exp_is_const) <OP_TYPEOF,
OP_DECLTYPE>: New cases.
* c-exp.y (TYPEOF, DECLTYPE): New tokens.
(type_exp): Add new productions.
(ident_tokens): Add __typeof__, typeof, __typeof, __decltype,
and decltype.
* eval.c (evaluate_subexp_standard) <OP_TYPEOF, OP_DECLTYPE>:
New case.
* expprint.c (dump_subexp_body_standard) <OP_TYPEOF,
OP_DECLTYPE>: New case.
* parse.c (operator_length_standard) <OP_TYPEOF, OP_DECLTYPE>:
New case.
* std-operator.def (OP_TYPEOF, OP_DECLTYPE): New constants.
* varobj.c (varobj_create): Handle OP_TYPEOF, OP_DECLTYPE.
gdb/testsuite
* gdb.cp/casts.exp: Add tests for typeof and decltype.
* gdb.cp/casts.cc (decltype): New function.
(main): Use it.
12 files changed:
gdb/ChangeLog
gdb/ax-gdb.c
gdb/breakpoint.c
gdb/c-exp.y
gdb/eval.c
gdb/expprint.c
gdb/parse.c
gdb/std-operator.def
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/casts.cc
gdb/testsuite/gdb.cp/casts.exp
gdb/varobj.c