diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-11-10 18:52:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-11-10 18:52:25 +0000 |
commit | 994b921186a7275b71c4462dbbb8895072fcbc64 (patch) | |
tree | d744788e3d80537d7c7cdd49d13e542ca7a3c146 /gdb/valops.c | |
parent | 06987e6431adee88dcffb552d01162668efbf9f4 (diff) | |
download | gdb-994b921186a7275b71c4462dbbb8895072fcbc64.zip gdb-994b921186a7275b71c4462dbbb8895072fcbc64.tar.gz gdb-994b921186a7275b71c4462dbbb8895072fcbc64.tar.bz2 |
2004-11-10 Andrew Cagney <cagney@gnu.org>
* value.h (COERCE_REF, COERCE_ARRAY, COERCE_NUMBER, COERCE_ENUM)
(coerce_ref, coerce_array, coerce_number, coerce_enum): Replace
macros with function declarations.
* value.c (coerce_ref, coerce_array, coerce_number)
(coerce_enum): New functions.
(value_as_long, value_as_address): Update.
* ada-lang.c (ada_coerce_ref, ada_value_binop)
(ada_evaluate_subexp, ada_value_assign, ada_value_struct_elt): Update.
* jv-lang.c (evaluate_subexp_java): Update.
* valarith.c (value_less, value_neg, value_complement)
(value_binop, value_add, value_subscript, value_x_binop)
(value_logical_not, value_sub): Update.
* valops.c (check_field, value_struct_elt, value_ind)
(value_find_oload_method_list, value_cast, value_assign): Update.
* eval.c (evaluate_subexp_standard): Update.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 18be57e..3e40a6d 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -212,7 +212,7 @@ value_cast (struct type *type, struct value *arg2) CHECK_TYPEDEF (type); code1 = TYPE_CODE (type); - COERCE_REF (arg2); + arg2 = coerce_ref (arg2); type2 = check_typedef (VALUE_TYPE (arg2)); /* A cast to an undetermined-length array_type, such as (TYPE [])OBJECT, @@ -524,13 +524,13 @@ value_assign (struct value *toval, struct value *fromval) if (!toval->modifiable) error ("Left operand of assignment is not a modifiable lvalue."); - COERCE_REF (toval); + toval = coerce_ref (toval); type = VALUE_TYPE (toval); if (VALUE_LVAL (toval) != lval_internalvar) fromval = value_cast (type, fromval); else - COERCE_ARRAY (fromval); + fromval = coerce_array (fromval); CHECK_TYPEDEF (type); /* Since modifying a register can trash the frame chain, and modifying memory @@ -896,7 +896,7 @@ value_ind (struct value *arg1) struct type *base_type; struct value *arg2; - COERCE_ARRAY (arg1); + arg1 = coerce_array (arg1); base_type = check_typedef (VALUE_TYPE (arg1)); @@ -1589,7 +1589,7 @@ value_struct_elt (struct value **argp, struct value **args, struct type *t; struct value *v; - COERCE_ARRAY (*argp); + *argp = coerce_array (*argp); t = check_typedef (VALUE_TYPE (*argp)); @@ -1600,7 +1600,7 @@ value_struct_elt (struct value **argp, struct value **args, *argp = value_ind (*argp); /* Don't coerce fn pointer to fn and then back again! */ if (TYPE_CODE (VALUE_TYPE (*argp)) != TYPE_CODE_FUNC) - COERCE_ARRAY (*argp); + *argp = coerce_array (*argp); t = check_typedef (VALUE_TYPE (*argp)); } @@ -1799,7 +1799,7 @@ value_find_oload_method_list (struct value **argp, char *method, int offset, *argp = value_ind (*argp); /* Don't coerce fn pointer to fn and then back again! */ if (TYPE_CODE (VALUE_TYPE (*argp)) != TYPE_CODE_FUNC) - COERCE_ARRAY (*argp); + *argp = coerce_array (*argp); t = check_typedef (VALUE_TYPE (*argp)); } @@ -2320,7 +2320,7 @@ check_field (struct value *arg1, const char *name) { struct type *t; - COERCE_ARRAY (arg1); + arg1 = coerce_array (arg1); t = VALUE_TYPE (arg1); |