]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added test that checks whether the compiler supports -Wno-empty-body.
authorBart Van Assche <bvanassche@acm.org>
Sun, 31 May 2009 11:22:58 +0000 (11:22 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 31 May 2009 11:22:58 +0000 (11:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10176

configure.in

index e6657df6c29c2ab350542d5e6c9a94436931d5c3..a455bc76fdd6e0a9b539202f0690b3bf20ccc9a2 100644 (file)
@@ -1212,6 +1212,29 @@ if test x$declaration_after_statement = xyes; then
 fi
 
 
+# does this compiler support -Wno-empty-body ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-empty-body])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-empty-body"
+
+AC_TRY_COMPILE(
+[ ],
+[
+  return 0;
+],
+[
+AC_SUBST([FLAG_W_NO_EMPTY_BODY], [-Wno-empty-body])
+AC_MSG_RESULT([yes])
+],
+[
+AC_SUBST([FLAG_W_NO_EMPTY_BODY], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
 # does this compiler support -Wno-format-zero-length ?
 
 AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])