This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix overload resolution of int* vs void*
- From: Tom Tromey <tromey at redhat dot com>
- To: sami wagiaalla <swagiaal at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 30 Aug 2010 14:01:04 -0600
- Subject: Re: [patch] Fix overload resolution of int* vs void*
- References: <4C7BCD42.9070308@redhat.com>
>>>>> "Sami" == sami wagiaalla <swagiaal@redhat.com> writes:
Sami> A fix for this bug http://sourceware.org/bugzilla/show_bug.cgi?id=10343
Sami> This patch makes it a little bit cheaper to convert a pointer to void*
Sami> than any other pointer conversion.
Consider this test:
struct B { };
struct D : public B { };
void f (void *x) { }
void f (B *x) { }
void g(D *x) { f(x); }
This should call f(B*), but with your patch I suspect it will call
f(void*).
Tom