nw="$nw -Wformat-nonliteral" # we do this a lot
nw="$nw -Wvla" # Emacs uses <vla.h>.
nw="$nw -Wswitch-default" # Too many warnings for now
+ 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 -Wcast-align"
fi
+ # This causes too much noise in the MinGW build
+ if test $opsys = mingw32; then
+ nw="$nw -Wpointer-sign"
+ fi
+
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
for w in $ws; do
gl_WARN_ADD([-Wno-unused-value])
fi
- AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
+ # This causes too much noise in the MinGW build
+ if test $opsys = mingw32; then
+ gl_WARN_ADD([-Wno-pointer-sign])
+ fi
+
+ AC_DEFINE([GCC_LINT], [1], [Define to 1 if --enable-gcc-warnings.])
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,