C/C++ PATCH to implement -Wpointer-compare warning (PR c++/64767)

Marek Polacek polacek@redhat.com
Fri Sep 23 13:29:00 GMT 2016


On Wed, Sep 21, 2016 at 03:52:09PM -0400, Jason Merrill wrote:
> On Mon, Sep 19, 2016 at 2:49 PM, Jason Merrill <jason@redhat.com> wrote:
> > I suppose that an INTEGER_CST of character type is necessarily a
> > character constant, so adding a check for !char_type_p ought to do the
> > trick.
> 
> Indeed it does.  I'm checking this in:

Nice, thanks.  What about the original patch?  We still need to warn
(or error for C++11) for pointer comparisons.

	Marek



More information about the Gcc-patches mailing list