diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-07-13 04:31:42 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-07-13 04:31:42 +0000 |
commit | fb933624929d0716f25db8d1096557e7f5e72440 (patch) | |
tree | e216dad7d0d61e68304e7ab329fe58c5c850799b /gdb/value.h | |
parent | d49c44d5f19771810279034d93060d13c13f0937 (diff) | |
download | gdb-fb933624929d0716f25db8d1096557e7f5e72440.zip gdb-fb933624929d0716f25db8d1096557e7f5e72440.tar.gz gdb-fb933624929d0716f25db8d1096557e7f5e72440.tar.bz2 |
gdb/
* infcall.c (value_arg_coerce): Use value_cast_pointers for
references. Avoid value_cast to a reference type. Don't silently
convert pointers to references.
* valops.c (value_cast_pointers): New, based on value_cast.
(value_cast): Use it. Reject reference types.
(value_ref): New.
(typecmp): Use it.
* value.h (value_cast_pointers, value_ref): New prototypes.
gdb/testsuite/
* gdb.cp/ref-params.exp: New test.
* gdb.cp/ref-params.cc: New source file.
* gdb.cp/Makefile.in (EXECUTABLES): Add ref-params.
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index a878ec4..87129d6 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -325,6 +325,8 @@ extern struct value *value_ind (struct value *arg1); extern struct value *value_addr (struct value *arg1); +extern struct value *value_ref (struct value *arg1); + extern struct value *value_assign (struct value *toval, struct value *fromval); @@ -367,6 +369,8 @@ extern struct type *value_rtti_target_type (struct value *, int *, int *, extern struct value *value_full_object (struct value *, struct type *, int, int, int); +extern struct value *value_cast_pointers (struct type *, struct value *); + extern struct value *value_cast (struct type *type, struct value *arg2); extern struct value *value_zero (struct type *type, enum lval_type lv); |