[PATCH] gdbsupport: include cstdlib in common-defs.h
Simon Marchi
simon.marchi@polymtl.ca
Mon Apr 27 13:30:00 GMT 2020
On 2020-04-10 1:29 p.m., Christian Biesinger wrote:
> On Fri, Apr 10, 2020 at 9:40 AM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>>
>> On 2020-04-09 7:34 p.m., Christian Biesinger wrote:
>>> I think this is reasonable, but I would add a comment why both cstdlib
>>> and stdlib.h are included (ie. to get the std:: version with
>>> overloaded functions)
>>
>> A comment would certainly be useful. Does that sound right?
>>
>> /* Include both stdlib.h and cstdlib to make sure to get the standard C
>> functions in the global namespace and the overloads in the std
>> namespace. */
>
> That sounds good to me.
>
I pushed this patch, although with a slightly different comment, because I forgot
I had written one here. But it says essentially the same thing.
Simon
More information about the Gdb-patches
mailing list