public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Mark Wielaard <mjw@redhat.com>, Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Warn when comparing nonnull arguments to NULL in a function.
Date: Mon, 14 Sep 2015 19:26:00 -0000	[thread overview]
Message-ID: <55F71EB6.4000104@redhat.com> (raw)
In-Reply-To: <1441837987.8165.127.camel@bordewijk.wildebeest.org>

On 09/09/2015 04:33 PM, Mark Wielaard wrote:
> On Thu, 2015-09-10 at 00:03 +0200, Jakub Jelinek wrote:
>> On Wed, Sep 09, 2015 at 04:01:07PM -0600, Jeff Law wrote:
>>>>         * gcc.dg/nonnull-4.c: New test.
>>>>         * g++.dg/warn/nonnull3.C: Likewise.
>>
>> If the tests are the same, perhaps stick just one test into
>> c-c++-common/nonnull-1.c instead?
>
> Yes, that would be better. The warnings should be exactly the same.
>
>>    Also, all the "cp1 compared to NULL"
>> strings mention cp1, did you mean the second one to mention cp2 and so on?
>
> Oops. copy/paste error indeed.
>
>>> Can you also upate the -Wnonnull documentation in invoke.texi to indicate it
>>> also will warn if it discovers a non-null argument that is compared against
>>> null?
>>>
>>> With the doc fix and a bootstrap/regression test, this patch ought to be
>>> fine.
>
> Documentation added. bootstrap/regression test still running.
>
> Updated patch attached.
Assuming the bootstrap & regression test completed without errors, this 
patch is fine for the trunk.  Please install if you haven't done so already.

jeff

  reply	other threads:[~2015-09-14 19:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 21:51 Mark Wielaard
2015-09-09 22:02 ` Jeff Law
2015-09-09 22:33   ` Jakub Jelinek
2015-09-09 23:01     ` Mark Wielaard
2015-09-14 19:26       ` Jeff Law [this message]
2015-09-15  3:43 ` Martin Sebor
2015-09-15  8:48   ` Mark Wielaard
2015-09-15 12:22     ` Manuel López-Ibáñez
2015-09-15 16:27       ` Mark Wielaard
2015-09-15 14:56     ` Martin Sebor

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=55F71EB6.4000104@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=mjw@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).