[mm-common] mm-warnings.m4: Fix MM_ARG_ENABLE_WARNINGS for C++11



commit 8fe12c7dad6d0a17a520fba6739b6355ae8d2409
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Nov 15 18:41:42 2015 +0100

    mm-warnings.m4: Fix MM_ARG_ENABLE_WARNINGS for C++11
    
    * macros/mm-warnings.m4: Don't compare a pointer with 0 in the test program.
    It does not work well with the -Wzero-as-null-pointer-constant option.
    Bug #757979.

 macros/mm-warnings.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/macros/mm-warnings.m4 b/macros/mm-warnings.m4
index ca2645d..840a4fc 100644
--- a/macros/mm-warnings.m4
+++ b/macros/mm-warnings.m4
@@ -95,7 +95,7 @@ AS_IF([test "x$mm_warning_flags" != x],
   # Keep in mind that the dummy source must be devoid of any
   # problems that might cause diagnostics.
   AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }
+int main(int argc, char** argv) { return !argv ? 0 : argc; }
 ]])])
   for mm_flag in $mm_warning_flags
   do


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]