summaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2011-10-14 20:22:15 +0000
committerKeith Seitz <keiths@redhat.com>2011-10-14 20:22:15 +0000
commit2e3e0cb4304527bf4623292f6f5916cd84de5887 (patch)
tree21302fa3ff165c6e2cffd6542c4eeab1e57ca6c9 /gdb/gdbtypes.h
parent0da82f3c14ad2432adc79035db74f1bec0d3a581 (diff)
downloadgdb-2e3e0cb4304527bf4623292f6f5916cd84de5887.tar.gz
PR c++/13225
* eval.c (evaluate_subexp_standard): Do not construct an array of types; pass the value array directly to find_overload_match. * gdbtypes.h (NULL_POINTER_CONVERSION_BADNESS): Declare. (rank_function): Take an array of values instead of types. (rank_one_type): Add struct value * parameter. * gdbtypes.c (NULL_POINTER_CONVERSION_BADNESS): Define. (rank_function): For each argument, pass the argument's value to rank_one_type. (rank_one_type): Add VALUE parameter. If the parameter type is a pointer and the argument type is an integer, return NULL_POINTER_CONVERSION_BADNESS if VALUE is zero. Update all calls to rank_one_type, passing NULL for new VALUE parameter. * valarith.c (value_user_defined_cpp_op): Do not construct an array of types; pass the value array directly to find_overload_match. * valops.c (find_overload_method_list): Take an array of values instead of types. Save the type of OBJP for later use. Update calls to find_oload_champ, and find_oload_champ_namespace. (find_oload_champ_namespace): Take an array of values instead of types. (find_oload_champ_namespace_loop): Likewise. (find_oload_champ): Likewise. (classify_oload_match): Inspect all arguments until INCOMPATIBLE is found. Return the worst badness found otherwise. (compare_parameters): Update call to rank_one_type. * value.h (find_overload_match): Take an array of values instead of types.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 9d9785bdec7..e6ed7ac10fc 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1555,6 +1555,8 @@ extern const struct rank BOOL_PTR_CONVERSION_BADNESS;
extern const struct rank BASE_CONVERSION_BADNESS;
/* Badness of converting from non-reference to reference. */
extern const struct rank REFERENCE_CONVERSION_BADNESS;
+/* Badness of converting integer 0 to NULL pointer. */
+extern const struct rank NULL_POINTER_CONVERSION;
/* Non-standard conversions allowed by the debugger */
/* Converting a pointer to an int is usually OK. */
@@ -1567,9 +1569,10 @@ extern int compare_ranks (struct rank a, struct rank b);
extern int compare_badness (struct badness_vector *, struct badness_vector *);
extern struct badness_vector *rank_function (struct type **, int,
- struct type **, int);
+ struct value **, int);
-extern struct rank rank_one_type (struct type *, struct type *);
+extern struct rank rank_one_type (struct type *, struct type *,
+ struct value *);
extern void recursive_dump_type (struct type *, int);