]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use -Wsuggest-attribute=malloc by default
authorEli Zaretskii <eliz@gnu.org>
Mon, 17 Aug 2020 16:43:29 +0000 (19:43 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 17 Aug 2020 16:43:29 +0000 (19:43 +0300)
* configure.ac: Move -Wsuggest-attribute=malloc to the set used
only under --enable-gcc-warnings.

configure.ac

index 745ff22d354c55d544e54f540605589d7361e806..ace1085284e5c4e57eccc4826d4edc8d6fab3de9 100644 (file)
@@ -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