summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-08-17 19:43:29 +0300
committerEli Zaretskii <eliz@gnu.org>2020-08-17 19:43:29 +0300
commita1fe15a6ce7996504a2a422ac59f3494aa20819f (patch)
treebcf76a52c8ff1ae30d1fea69fa26eaae1573f064 /configure.ac
parent3a17b9f265fd6d42e82f649533027b4531f9dabf (diff)
downloademacs-a1fe15a6ce7996504a2a422ac59f3494aa20819f.tar.gz
Don't use -Wsuggest-attribute=malloc by default
* configure.ac: Move -Wsuggest-attribute=malloc to the set used only under --enable-gcc-warnings.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 745ff22d354..ace1085284e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1026,7 +1026,10 @@ AS_IF([test $gl_gcc_warnings = no],
[# Use -fanalyzer and related options only if --enable-gcc-warnings,
# as they slow GCC considerably.
nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"
- nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"])
+ nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"
+ # Use -Wsuggest-attribute=malloc only if --enable-gcc-warnings,
+ # as it doesn't flag code that is wrong in any way.
+ nw="$nw -Wsuggest-attribute=malloc"])
nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
nw="$nw -Wduplicated-branches" # Too many false alarms