This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] inf-ptrace: Do not stop memory transfers after a single word
On Mon, Mar 13 2017, Pedro Alves wrote:
> On 03/13/2017 07:50 PM, Andreas Arnez wrote:
>> On Mon, Mar 13 2017, Pedro Alves wrote:
>>
>>> On 03/10/2017 03:48 PM, Simon Marchi wrote:
>>>
>>>> I don't the idea behind that rule. I thought it was just for readability,
>>>> to make it clear that the variable is a pointer without having to refer to the
>>>> declaration. Perhaps some older timers could shed some light on that :).
>>>
>>> I don't know the original rationale, but I agree that nowadays the
>>> justification can only be in terms of readability. The same reason we
>>> do
>>> if (integer_that_is_not_a_boolean != 0)
>>> instead of
>>> if (integer_that_is_not_a_boolean)
>>> .
>>
>> Right, it's a GDB-specific style rule. So who fixes the explanation on
>> the Wiki page? :-)
>
> It's a wiki, so anyone can do that. Want to volunteer? :-)
OK, I just changed it and added your example above:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Comparison_With_NULL_And_Zero
Comments welcome!
--
Andreas