forked from Imagelibrary/binutils-gdb
2006-01-24 Jim Blandy <jimb@redhat.com>
* valarith.c (binop_user_defined_p): Handle refs to typedefs.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2006-01-24 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
|
* valarith.c (binop_user_defined_p): Handle refs to typedefs.
|
||||||
|
|
||||||
2006-01-24 Fred Fish <fnf@specifix.com>
|
2006-01-24 Fred Fish <fnf@specifix.com>
|
||||||
|
|
||||||
* parse.c (source.h): Include.
|
* parse.c (source.h): Include.
|
||||||
|
|||||||
@@ -285,9 +285,9 @@ value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check to see if either argument is a structure. This is called so
|
/* Check to see if either argument is a structure, or a reference to
|
||||||
we know whether to go ahead with the normal binop or look for a
|
one. This is called so we know whether to go ahead with the normal
|
||||||
user defined function instead.
|
binop or look for a user defined function instead.
|
||||||
|
|
||||||
For now, we do not overload the `=' operator. */
|
For now, we do not overload the `=' operator. */
|
||||||
|
|
||||||
@@ -297,14 +297,17 @@ binop_user_defined_p (enum exp_opcode op, struct value *arg1, struct value *arg2
|
|||||||
struct type *type1, *type2;
|
struct type *type1, *type2;
|
||||||
if (op == BINOP_ASSIGN || op == BINOP_CONCAT)
|
if (op == BINOP_ASSIGN || op == BINOP_CONCAT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
type1 = check_typedef (value_type (arg1));
|
type1 = check_typedef (value_type (arg1));
|
||||||
|
if (TYPE_CODE (type1) == TYPE_CODE_REF)
|
||||||
|
type1 = check_typedef (TYPE_TARGET_TYPE (type1));
|
||||||
|
|
||||||
type2 = check_typedef (value_type (arg2));
|
type2 = check_typedef (value_type (arg2));
|
||||||
|
if (TYPE_CODE (type2) == TYPE_CODE_REF)
|
||||||
|
type2 = check_typedef (TYPE_TARGET_TYPE (type2));
|
||||||
|
|
||||||
return (TYPE_CODE (type1) == TYPE_CODE_STRUCT
|
return (TYPE_CODE (type1) == TYPE_CODE_STRUCT
|
||||||
|| TYPE_CODE (type2) == TYPE_CODE_STRUCT
|
|| TYPE_CODE (type2) == TYPE_CODE_STRUCT);
|
||||||
|| (TYPE_CODE (type1) == TYPE_CODE_REF
|
|
||||||
&& TYPE_CODE (TYPE_TARGET_TYPE (type1)) == TYPE_CODE_STRUCT)
|
|
||||||
|| (TYPE_CODE (type2) == TYPE_CODE_REF
|
|
||||||
&& TYPE_CODE (TYPE_TARGET_TYPE (type2)) == TYPE_CODE_STRUCT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check to see if argument is a structure. This is called so
|
/* Check to see if argument is a structure. This is called so
|
||||||
|
|||||||
Reference in New Issue
Block a user