This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Guard a call to TYPE_TARGET_TYPE in gnuv3_pass_by_reference
- From: Siva Chandra <sivachandra at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Doug Evans <dje at google dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 16 Oct 2014 11:10:26 -0700
- Subject: Re: [PATCH] Guard a call to TYPE_TARGET_TYPE in gnuv3_pass_by_reference
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gzAMpiA8Hwt1=DqmFxXjfe44nqGsCqsj-fx=ObJbgPAsA at mail dot gmail dot com> <544007F1 dot 9010005 at redhat dot com>
On Thu, Oct 16, 2014 at 11:01 AM, Pedro Alves <palves@redhat.com> wrote:
>> 2014-10-16 Siva Chandra Reddy <sivachandra@google.com>
>>
>> * gnu-v3-abi.c (gnuv3_pass_by_reference): Call TYPE_TARGET_TYPE
>> on the arg type of a constructor only if it is of reference type.
>>
>
> How did you notice this? Does an existing test catch it?
I hit it while I was "using" GDB so to say :)
I had a class which had a copy constructor as well as another
constructor taking an argument. It fails when going over the other
constructor.
Do you think a test case should be added? I did think about it, but
then, should there be a test case for every use of TYPE_TARGET_TYPE? I
thought it was more of a "user mistake" in my original patch.
Thank you,
Siva Chandra