This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: avoid deprecated_set_value_type in find_overload_match


I'm checking this in.

Usually deprecated_set_value_type is "ok" to use if you have just
constructed a new value and for some reason need to override the type --
it basically exists because we are missing some value constructors.

However, find_overload_match uses deprecated_set_value_type incorrectly,
resetting the type of an already existing value.

I'm checking in this fix.

Built and regtested on x86-64 Fedora 16.

Tom

2012-06-14  Tom Tromey  <tromey@redhat.com>

	* valops.c (find_overload_match): Use value_ind.

diff --git a/gdb/valops.c b/gdb/valops.c
index feb47f5..afec392 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -2681,8 +2681,7 @@ find_overload_match (struct value **args, int nargs,
          and non member function, the first argument must now be
          dereferenced.  */
       if (method == BOTH)
-	deprecated_set_value_type (args[0],
-				   TYPE_TARGET_TYPE (value_type (args[0])));
+	args[0] = value_ind (args[0]);
 
       if (fsym)
         {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]