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]

Re: [RFA] Clear entire "location" in value constructor


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


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