Skip to content

Commit

Permalink
Add -fanalyzer option if available. (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv authored Dec 22, 2024
1 parent f61e851 commit bf6ac20
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ am__can_run_installinfo = \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
config.sub install-sh ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
Expand Down
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -17143,13 +17143,15 @@ then
-Wanalyzer-file-leak \
-Wanalyzer-free-of-non-heap \
-Wanalyzer-malloc-leak \
-Wanalyzer-possible-null-dereference \
-Wanalyzer-mismatching-deallocation \
-Wanalyzer-null-dereference \
-Wanalyzer-null-argument \
-Wanalyzer-possible-null-argument \
-Wanalyzer-shift-count-negative \
-Wanalyzer-overflow \
-Wanalyzer-stale-setjmp-buffer \
-Wanalyzer-tainted-array-index \
-Wanalyzer-unsafe-call-within-signal-handler \
-Wanalyzer-use-after-free \
-Wanalyzer-use-of-pointer-in-stale-stack-frame \
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,24 @@ then

# "Iffy" g++ options. Some reasonably current g++-like
# compilers may not support these.
# TODO: Once false positive in std lib is fixed, simplify to "-fanalyzer".
# The -fanalyzer one is a macro option for many of the others.
add_compiler_opts_if_ok \
-fanalyzer \
-Wanalyzer-double-fclose \
-Wanalyzer-double-free \
-Wanalyzer-exposure-through-output-file \
-Wanalyzer-file-leak \
-Wanalyzer-free-of-non-heap \
-Wanalyzer-malloc-leak \
-Wanalyzer-possible-null-dereference \
-Wanalyzer-mismatching-deallocation \
-Wanalyzer-null-dereference \
-Wanalyzer-null-argument \
-Wanalyzer-possible-null-argument \
-Wanalyzer-shift-count-negative \
-Wanalyzer-overflow \
-Wanalyzer-stale-setjmp-buffer \
-Wanalyzer-tainted-array-index \
-Wanalyzer-unsafe-call-within-signal-handler \
-Wanalyzer-use-after-free \
-Wanalyzer-use-of-pointer-in-stale-stack-frame \
Expand Down

0 comments on commit bf6ac20

Please sign in to comment.