From 23605f58bfd5c47d0f6fbd2aa57a8bda15e720df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 7 Oct 2019 14:07:28 +0100 Subject: [PATCH] build: ask for -std=gnu99 explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We previously got -std=gnu99 secretly enabled as a side-effect of requesting the 'stdarg' gnulib module. We rely on some extensions from c99/gnu99 and while RHEL-7 supports this, it still defaults to gnu89. RHEL-7 also supports some newer standards but declares them experimental/incomplete, so sticking with gnu99 is best bet for now & matches historical usage. Reviewed-by: Fabiano Fidêncio Signed-off-by: Daniel P. Berrangé --- m4/virt-compile-warnings.m4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index f9460e82ba..411d257465 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -189,6 +189,11 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ wantwarn="$wantwarn -Werror" fi + # Request the gnu99 standard which is the best choice with + # gcc 4.8.0. Not a warning flag, but the probing mechanism + # is convenient + wantwarn="-std=gnu99" + # Check for $CC support of each warning for w in $wantwarn; do gl_WARN_ADD([$w]) -- 2.47.2