This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Move the -Wnonnull compare against NULL warning from FEs to early uninit under -Wnonnull-compare (PR c/69835)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>, Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, Mark Wielaard <mjw at redhat dot com>
- Date: Tue, 16 Feb 2016 21:01:16 +0100
- Subject: Re: [PATCH] Move the -Wnonnull compare against NULL warning from FEs to early uninit under -Wnonnull-compare (PR c/69835)
- Authentication-results: sourceware.org; auth=none
- References: <20160216152925 dot GU3017 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1602161630560 dot 1392 at t29 dot fhfr dot qr> <56C3668B dot 3060109 at redhat dot com> <20160216182149 dot GX3017 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 16, 2016 at 07:21:49PM +0100, Jakub Jelinek wrote:
> I'm already bootstrapping/regtesting following variant.
>
> 2016-02-16 Jakub Jelinek <jakub@redhat.com>
>
> PR c/69835
> * common.opt (Wnonnull-compare): New warning.
> * doc/invoke.texi (-Wnonnull): Remove text about comparison
> of arguments against NULL.
> (-Wnonnull-compare): Document.
> * Makefile.in (OBJS): Add gimple-ssa-nonnull-compare.o.
> * tree-pass.h (make_pass_warn_nonnull_compare): Declare.
> * passes.def (pass_warn_nonnull_compare): Add.
> * gimple-ssa-nonnull-compare.c: New file.
> c-family/
> * c.opt (Wnonnull-compare): Enable for -Wall.
> c/
> * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
> cp/
> * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
> testsuite/
> * c-c++-common/nonnull-1.c: Use -Wnonnull-compare instead of
> -Wnonnull in dg-options.
> * c-c++-common/nonnull-2.c: New test.
Now successfully bootstrapped/regtested on both x86_64-linux and i686-linux.
Ok for trunk?
Jakub