This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] environ-selftests: Ignore -Wself-move warning
On Wednesday, June 21 2017, Simon Marchi wrote:
> On 2017-06-21 22:29, Sergio Durigan Junior wrote:
>>> +#ifdef __clang__
>>> +#pragma clang diagnostic push
>>> +#pragma clang diagnostic ignored "-Wself-move"
>>> +#endif /* __clang__ */
>>> env = std::move (env);
>>> +#ifdef __clang__
>>> +#pragma clang diagnostic pop
>>> +#endif /* __clang__ */
>
>> Do you
>> think it's worth putting a comment on top, just to explicitly say what
>> this is doing?
>
> Forgot to reply to this. It seemed self-explanatory enough to me that
> ignoring the "self-move" warning just above a blatant self move was
> probably to silence a warning pointing out the self move :).
Yeah, you're right. I just thought a comment in English would make it
*even* clearer ;-). But that's just a personal preference, I don't
mind.
Cheers,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/