On Fri, Sep 23, 2016 at 9:15 AM, Marek Polacek <pola...@redhat.com> wrote: > On Wed, Sep 21, 2016 at 03:52:09PM -0400, Jason Merrill wrote: >> On Mon, Sep 19, 2016 at 2:49 PM, Jason Merrill <ja...@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.
If we still accept pointer comparisons in C++, that's another bug with treating \0 as a null pointer constant. This seems to be because ocp_convert of \0 to int produces an INTEGER_CST indistinguishable from literal 0. Jason