Skip to contentSkip to conversation

build: add -Wexpansion-to-defined

PATCH In review Paolo Bonzini 2 participants 2 messages Jul 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: add -Wexpansion-to-defined

This warning is included in -Wall by clang, but not by GCC (which only enables it for -Wextra). Include it in the list of warnings we enable to minimize the differences between the compilers:

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 806658c98b..bd1769d4d8 100755
@@ -1583,7 +1583,7 @@ gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
 gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
 gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
 gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"
-gcc_flags="-Wno-initializer-overrides $gcc_flags"
+gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"
 gcc_flags="-Wno-string-plus-int $gcc_flags"
 # Note that we do not add -Werror to gcc_flags here, because that would
 # enable it for all configure tests. If a configure test failed due
Signature · 1 line
2.13.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Paolo Bonzini

This warning is included in -Wall by clang, but not by GCC (which only enables it for -Wextra). Include it in the list of warnings we enable to minimize the differences between the compilers:

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

For anyone interested in what this warning does:
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Warning-Options.html#index-Wexpansion-to-defined