This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog c-exp.y eval.c expprint.c ex ...
- From: tromey at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 18 Jan 2010 20:54:35 -0000
- Subject: src/gdb ChangeLog c-exp.y eval.c expprint.c ex ...
CVSROOT: /cvs/src
Module name: src
Changes by: tromey@sourceware.org 2010-01-18 20:54:35
Modified files:
gdb : ChangeLog c-exp.y eval.c expprint.c
expression.h gdbtypes.c gdbtypes.h parse.c
valops.c value.h
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.cp: casts.cc casts.exp
Log message:
gdb
PR c++/9680:
* c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
(CONST_CAST): New tokens.
(exp): Add new productions.
(ident_tokens): Add const_cast, dynamic_cast, static_cast, and
reinterpret_cast.
(is_cast_operator): New function.
(yylex): Handle cast operators specially.
* eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
UNOP_REINTERPRET_CAST>: New cases.
* expprint.c (print_subexp_standard): Likewise.
(op_name_standard): Likewise.
(dump_subexp_body_standard): Likewise.
* parse.c (operator_length_standard): Likewise.
* expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
UNOP_REINTERPRET_CAST.
* gdbtypes.c (class_types_same_p): New function.
(is_ancestor): Use it.
(is_public_ancestor): New function.
(is_unique_ancestor_worker): Likewise.
(is_unique_ancestor): Likewise.
* gdbtypes.h (class_types_same_p, is_public_ancestor)
(is_unique_ancestor): Declare.
* valops.c (value_reinterpret_cast): New function.
(dynamic_cast_check_1): Likewise.
(dynamic_cast_check_2): Likewise.
(value_dynamic_cast): Likewise.
* value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
gdb/testsuite
PR c++/9680:
* gdb.cp/casts.cc: Add new classes and variables.
* gdb.cp/casts.exp: Test new operators.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11266&r2=1.11267
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/c-exp.y.diff?cvsroot=src&r1=1.68&r2=1.69
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/eval.c.diff?cvsroot=src&r1=1.124&r2=1.125
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/expprint.c.diff?cvsroot=src&r1=1.41&r2=1.42
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/expression.h.diff?cvsroot=src&r1=1.33&r2=1.34
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gdbtypes.c.diff?cvsroot=src&r1=1.183&r2=1.184
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gdbtypes.h.diff?cvsroot=src&r1=1.119&r2=1.120
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/parse.c.diff?cvsroot=src&r1=1.93&r2=1.94
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/valops.c.diff?cvsroot=src&r1=1.231&r2=1.232
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/value.h.diff?cvsroot=src&r1=1.152&r2=1.153
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2091&r2=1.2092
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/casts.cc.diff?cvsroot=src&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/casts.exp.diff?cvsroot=src&r1=1.9&r2=1.10