From: Martin Sebor <msebor@gmail.com>
To: Jason Merrill <jason@redhat.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: RFA: PATCH to add id_strcmp helper function
Date: Fri, 19 May 2017 03:13:00 -0000 [thread overview]
Message-ID: <b9644643-c164-bc33-4818-f2b2e7f1b892@gmail.com> (raw)
In-Reply-To: <CADzB+2=nUE9Ma58PpzfaC97+TxXd3bBJ3Er_ZeAQjXogfUsEcw@mail.gmail.com>
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().
Martin
next prev parent reply other threads:[~2017-05-19 3:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 2:32 Jason Merrill
2017-05-19 3:13 ` Martin Sebor [this message]
2017-05-24 1:45 ` Jason Merrill
2017-06-09 20:07 ` Jason Merrill
2017-06-10 5:54 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9644643-c164-bc33-4818-f2b2e7f1b892@gmail.com \
--to=msebor@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).