AC_INIT(GNU Emacs, 27.0.50, address@hidden, , https://www.gnu.org/software/emacs/) # This, $nw, is the list of warnings we disable. nw= nw="$nw -Wcast-align -Wcast-align=strict" # Emacs is tricky with pointers. nw="$nw -Wduplicated-branches" # Too many false alarms nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Woverlength-strings" # Not a problem these days nw="$nw -Wformat-nonliteral" # we do this a lot nw="$nw -Wvla" # Emacs uses . nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects. nw="$nw -Winline" # OK to ignore 'inline' nw="$nw -Wstrict-overflow" # OK to optimize assuming that # signed overflow has undefined behavior nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations nw="$nw -Wbad-function-cast" # These casts are no worse than others. nw="$nw -Wabi" # Not useful, perceived as noise # Emacs doesn't care about shadowing; see # . nw="$nw -Wshadow" # Emacs's use of alloca inhibits protecting the stack. nw="$nw -Wstack-protector" # Emacs's use of __attribute__ ((cold)) causes false alarms with this option. nw="$nw -Wsuggest-attribute=cold" # Emacs's use of partly-const functions such as Fgnutls_available_p # make this option problematic. nw="$nw -Wsuggest-attribute=const" # Emacs's use of partly-pure functions such as CHECK_TYPE make this # option problematic. nw="$nw -Wsuggest-attribute=pure" # This part is merely for shortening the command line, # since -Wall implies -Wswitch. nw="$nw -Wswitch" # This part is merely for shortening the command line, # since -Wno-FOO needs to be added below regardless. nw="$nw -Wmissing-field-initializers" nw="$nw -Woverride-init" nw="$nw -Wtype-limits" nw="$nw -Wunused-parameter" gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) ws="$ws -Wredundant-decls" # Prefer this, as we don't use Bison. ws="$ws -Wno-missing-field-initializers" # We need this one ws="$ws -Wno-override-init" # More trouble than it is worth ws="$ws -Wno-sign-compare" # Too many warnings for now ws="$ws -Wno-type-limits" # Too many warnings for now ws="$ws -Wno-unused-parameter" # Too many warnings for now ws="$ws -Wno-format-nonliteral" dnl ws="$ws -Wbogus-warning" gl_WARN_ADD_MULTIPLE([$ws])