mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
gdb
PR exp/9059: * valops.c (find_overload_match): Follow typedefs before taking address of object argument. gdb/testsuite PR exp/9059: * gdb.cp/call-c.exp: Add regression test. * gdb.cp/call-c.cc (FooHandle): New typedef. (main): New variable 'handle'.
This commit is contained in:
@@ -2173,9 +2173,11 @@ find_overload_match (struct type **arg_types, int nargs,
|
||||
|
||||
if (objp)
|
||||
{
|
||||
if (TYPE_CODE (value_type (temp)) != TYPE_CODE_PTR
|
||||
&& (TYPE_CODE (value_type (*objp)) == TYPE_CODE_PTR
|
||||
|| TYPE_CODE (value_type (*objp)) == TYPE_CODE_REF))
|
||||
struct type *temp_type = check_typedef (value_type (temp));
|
||||
struct type *obj_type = check_typedef (value_type (*objp));
|
||||
if (TYPE_CODE (temp_type) != TYPE_CODE_PTR
|
||||
&& (TYPE_CODE (obj_type) == TYPE_CODE_PTR
|
||||
|| TYPE_CODE (obj_type) == TYPE_CODE_REF))
|
||||
{
|
||||
temp = value_addr (temp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user