[Bug analyzer/105947] RFE: -fanalyzer should complain about jumps through NULL function pointers
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 5 23:51:19 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105947
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:e1a9168153d2bf12695844a9ca9f9fc1de8d1ddf
commit r13-1979-ge1a9168153d2bf12695844a9ca9f9fc1de8d1ddf
Author: David Malcolm <dmalcolm@redhat.com>
Date: Fri Aug 5 19:45:41 2022 -0400
New warning: -Wanalyzer-jump-through-null [PR105947]
This patch adds a new warning to -fanalyzer for jumps through NULL
function pointers.
gcc/analyzer/ChangeLog:
PR analyzer/105947
* analyzer.opt (Wanalyzer-jump-through-null): New option.
* engine.cc (class jump_through_null): New.
(exploded_graph::process_node): Complain about jumps through NULL
function pointers.
gcc/ChangeLog:
PR analyzer/105947
* doc/invoke.texi: Add -Wanalyzer-jump-through-null.
gcc/testsuite/ChangeLog:
PR analyzer/105947
* gcc.dg/analyzer/function-ptr-5.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
More information about the Gcc-bugs
mailing list