diff options
author | swagiaal <swagiaal> | 2010-10-14 16:13:35 +0000 |
---|---|---|
committer | swagiaal <swagiaal> | 2010-10-14 16:13:35 +0000 |
commit | 0dec04cd391afbd7848a83092d1fbfc5dfbdb0e1 (patch) | |
tree | aac1ca7e77443c891707cff66f58b1341beb03ad /gdb/gdbtypes.h | |
parent | 715c8705f637e8505d601c1ccf86fc3e00d58c95 (diff) | |
download | gdb-0dec04cd391afbd7848a83092d1fbfc5dfbdb0e1.tar.gz |
Fixed void* vs int* overload issue (PR C++/10343).
2010-10-14 Sami Wagiaalla <swagiaal@redhat.com>
* gdbtypes.h: Create BASE_PTR_CONVERSION_BADNESS.
* gdbtypes.c (rank_one_type): Move type comparison code out of here
to...
(types_equal): ...here. And changed it as follows:
Outside of typedefs type must be of the same TYPE_CODE.
When compairing two pointers or references they are equal if their
targets are equal.
Correct pointer conversions.
2010-10-14 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/converts.cc: New test program.
* gdb.cp/converts.exp: New test.
* gdb.cp/overload.exp: Added test for void* vs int*.
* gdb.cp/overload.exp: Ditto.
* gdb.cp/oranking.exp: Removed related kfail.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index a6e5762a1fa..87defcd0a8e 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1399,6 +1399,9 @@ extern int is_unique_ancestor (struct type *, struct value *); #define INTEGER_PROMOTION_BADNESS 1 /* Badness of floating promotion */ #define FLOAT_PROMOTION_BADNESS 1 +/* Badness of converting a derived class pointer + to a base class pointer. */ +#define BASE_PTR_CONVERSION_BADNESS 1 /* Badness of integral conversion */ #define INTEGER_CONVERSION_BADNESS 2 /* Badness of floating conversion */ |