|
From: Julian S. <se...@so...> - 2019-01-26 17:22:03
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3e94579a5afa459641856d104008a1f5dc387fdd commit 3e94579a5afa459641856d104008a1f5dc387fdd Author: Julian Seward <js...@ac...> Date: Sat Jan 26 18:19:50 2019 +0100 Enable warning flag -Wenum-conversion if the compiler supports it. This picks up some enum type confusion, and so looks useful. Unfortunately only Clang seems to have it; gcc doesn't. Diff: --- Makefile.all.am | 1 + configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.all.am b/Makefile.all.am index 4a29695..8ea95a6 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -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@ \ diff --git a/configure.ac b/configure.ac index 289514f..35c6f74 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |