]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Enable warning flag -Wenum-conversion if the compiler supports it.
authorJulian Seward <jseward@acm.org>
Sat, 26 Jan 2019 17:19:50 +0000 (18:19 +0100)
committerJulian Seward <jseward@acm.org>
Sat, 26 Jan 2019 17:19:50 +0000 (18:19 +0100)
This picks up some enum type confusion, and so looks useful.  Unfortunately
only Clang seems to have it; gcc doesn't.

Makefile.all.am
configure.ac

index 4a29695cce1d709301a18390cf8d9a44737bf620..8ea95a611871ea9a4d2878c1cebbf530341221cf 100644 (file)
@@ -114,6 +114,7 @@ AM_CFLAGS_BASE = \
        @FLAG_W_IGNORED_QUALIFIERS@ \
        @FLAG_W_MISSING_PARAMETER_TYPE@ \
        @FLAG_W_LOGICAL_OP@ \
+       @FLAG_W_ENUM_CONVERSION@ \
        @FLAG_W_OLD_STYLE_DECLARATION@ \
        @FLAG_FNO_STACK_PROTECTOR@ \
        @FLAG_FSANITIZE@ \
index 289514ff15d1481d36dcd91130b992d81f239808..35c6f744b5a3bd3d57b0481e022120e099f511a8 100644 (file)
@@ -2112,6 +2112,7 @@ AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION])
 AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS])
 AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE])
 AC_GCC_WARNING_SUBST([logical-op], [FLAG_W_LOGICAL_OP])
+AC_GCC_WARNING_SUBST([enum-conversion], [FLAG_W_ENUM_CONVERSION])
 
 # Does this compiler support -Wformat-security ?
 # Special handling is needed, because certain GCC versions require -Wformat