This is the mail archive of the
mailing list for the GCC project.
Re: RFA: PATCH to add id_strcmp helper function
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org,Jason Merrill <jason at redhat dot com>,Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Jun 2017 07:54:31 +0200
- Subject: Re: RFA: PATCH to add id_strcmp helper function
- Authentication-results: sourceware.org; auth=none
- References: <CADzB+2=nUE9Ma58PpzfaC97+TxXd3bBJ3Er_ZeAQjXogfUsEcw@mail.gmail.com> <email@example.com> <CADzB+2nTdYJ9+jqdTpRdPynar3RG9CmFu3Go2fQnnmm808-ALA@mail.gmail.com> <CADzB+2=U2XdJPX62Qso+1G3z7fqmFJZ-yuS-qOZv9vT59V9=eA@mail.gmail.com>
On June 9, 2017 10:07:36 PM GMT+02:00, Jason Merrill <firstname.lastname@example.org> wrote:
>On Tue, May 23, 2017 at 5:52 PM, Jason Merrill <email@example.com>
>> On Thu, May 18, 2017 at 11:03 PM, Martin Sebor <firstname.lastname@example.org>
>>> On 05/18/2017 08:30 PM, Jason Merrill wrote:
>>>> I got tired of writing strcmp (IDENTIFIER_POINTER and decided to
>>>> it in an inline function. I decided to use "id_strcmp" instead of
>>>> just overloading strcmp, but I don't feel strongly about that
>>>> The second patch changes all existing uses of that pattern to use
>>>> 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
>>> 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?