[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a1fe15a: Don't use -Wsuggest-attribute=malloc by default

From: Eli Zaretskii
Subject: master a1fe15a: Don't use -Wsuggest-attribute=malloc by default
Date: Mon, 17 Aug 2020 12:44:28 -0400 (EDT)

branch: master
commit a1fe15a6ce7996504a2a422ac59f3494aa20819f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Don't use -Wsuggest-attribute=malloc by default
    * configure.ac: Move -Wsuggest-attribute=malloc to the set used
    only under --enable-gcc-warnings.
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 745ff22..ace1085 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]