But remove some of the more annoying clang ones:
18 [-Werror,-Wconversion]
18 [-Werror,-Wdisabled-macro-expansion]
9 [-Werror,-Wdouble-promotion]
9 [-Werror,-Wfloat-conversion]
1 [-Werror,-Wformat-nonliteral]
52 [-Werror,-Wpadded]
29 [-Werror,-Wshorten-64-to-32]
75 [-Werror,-Wsign-conversion]
It's not really feasible to enable every warning.
CFLAGS="$CFLAGS -O"
fi
+AC_ARG_ENABLE(more_warnings,
+ [AS_HELP_STRING([--enable-more-warnings],
+ [enable more compiler warnings])])
+if test x${enable_more_warnings} = xyes; then
+ CFLAGS="$CFLAGS -Wextra -Wpedantic"
+ if test "$ac_compiler_clang" = yes; then
+ CFLAGS="$CFLAGS -Weverything"
+ CFLAGS="$CFLAGS -Wno-padded -Wno-disabled-macro-expansion -Wno-format-nonliteral"
+ CFLAGS="$CFLAGS -Wno-double-promotion -Wno-float-conversion"
+ CFLAGS="$CFLAGS -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-conversion"
+ fi
+fi
+
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT