This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: PATCH to add id_strcmp helper function


On June 9, 2017 10:07:36 PM GMT+02:00, Jason Merrill <jason@redhat.com> wrote:
>On Tue, May 23, 2017 at 5:52 PM, Jason Merrill <jason@redhat.com>
>wrote:
>> On Thu, May 18, 2017 at 11:03 PM, Martin Sebor <msebor@gmail.com>
>wrote:
>>> On 05/18/2017 08:30 PM, Jason Merrill wrote:
>>>>
>>>> I got tired of writing strcmp (IDENTIFIER_POINTER and decided to
>wrap
>>>> it in an inline function.  I decided to use "id_strcmp" instead of
>>>> just overloading strcmp, but I don't feel strongly about that
>choice.
>>>>
>>>> The second patch changes all existing uses of that pattern to use
>the
>>>> new function.
>>>>
>>>> OK for trunk?
>>>
>>>
>>> Since all the uses are of the form !id_strcmp(), would taking
>>> a step further and introducing a bool id_equal() be going too
>>> far?
>>>
>>> Besides being (arguably) easier to read, it would get around
>>> the question of whether it should be !id_strcmp() or
>>> id_strcmp == 0, or perhaps even 0 == id_strcmp().
>>
>> Makes sense.
>>
>> OK for trunk?
>
>Ping?

OK.

Richard.


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