This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Clear entire "location" in value constructor
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 25 May 2018 20:53:41 +0100
- Subject: Re: [RFA] Clear entire "location" in value constructor
- References: <20180410173704.21702-1-tom@tromey.com> <935d0c19b292f0793d89a2029f12cdc8@polymtl.ca> <87vabbzfa2.fsf@tromey.com>
On 05/25/2018 08:49 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> Ah, I stumbled upon that code recently and wondered why only
> Simon> location.address was set. Either memset or {} is fine with me.
Note that this is a union.
>
> Thanks. I think I will change it to {}, since that seems cleaner.
Note that {} has the same effect as only setting the first field
of the union with Clang, so it's a nop patch. It shouldn't
really matter -- we're only supposed to access the active
member anyway.
Thanks,
Pedro Alves