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

--- Comment #40 from Jon Grant <jg at jguk dot org> ---
(In reply to Manuel López-Ibáñez from comment #35)
<snip>
> which means that there is a path through which a null pointer could be
> potentially dereferenced. However, this actually cannot happen because
> linemap_add will not return NULL in this case.
> 
> I fear this case might be quite common and lead to many false positives that
> are then quite hard to understand due to the poor location info in the
> middle-end.

I am sure this is very common.. we use static analysis, and there will be many
potentially dereferences.. the thing is, the implementation of linemap_add may
be changed.. so those calling linemap_add should always check result is
non-NULL before using right? (then the calling code can handle gracefully)

Reply via email to