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

--- Comment #10 from janus at gcc dot gnu.org ---
(In reply to janus from comment #9)
> But at least clang 3.9 has some additional diagnostics:
> 
> null_ref.cpp:11:5: warning: binding dereferenced null pointer to reference
> has undefined behavior [-Wnull-dereference]
>   f(*((int*) NULL));
>     ^~~~~~~~~~~~~~
> 
> Ideally GCC should yield the same warning

See PR 16351. Lately GCC seems to have a -Wnull-dereference flag as well, but
apparently it fails on the test case here.

Reply via email to