https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578

--- Comment #9 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> Note heuristically 0xe8ffc000 isn't likely such an offset from a NULL
> pointer object because the object would be quite large.
> 
> The diagnostic could maybe also clarify that it assumes 0xe8ffc000 is an
> offsetted NULL pointer.

I can do that in stage 1 when I convert the warning to use the access_ref class
(that exposes this information).

A better solution we discussed with Jeff is to issue -Wnonnull when a member
access through a null pointer is first detected.  Using something like
__builtin_warning for that would help avoid false positives when this happens
early on (in the test case in comment #1 that's in EVRP).

Reply via email to