On 12/02/2015 10:27 AM, Marek Polacek wrote:
We were hitting the assert in nonnull_arg_p that only wants to see POINTER_TYPE,
but it got OFFSET_TYPE instead.  Which is--in tree.def--described as "a pointer
relative to an object".  Thus I think we should allow OFFSET_TYPE here.  In the
attached testcase I demonstrated that this warning works even for OFFSET_TYPEs.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2015-12-02  Marek Polacek  <pola...@redhat.com>

        PR c++/68653
        * tree.c (nonnull_arg_p): Allow OFFSET_TYPE.

        * g++.dg/warn/nonnull3.C: New test.
OK.
jeff

Reply via email to