--- old/make/autoconf/flags-cflags.m4 2018-08-29 17:15:41.631792890 -0700 +++ new/make/autoconf/flags-cflags.m4 2018-08-29 17:15:41.329792985 -0700 @@ -150,7 +150,13 @@ AC_MSG_RESULT([no (explicitly set)]) WARNINGS_AS_ERRORS=false elif test "x$enable_warnings_as_errors" = "x"; then - AC_MSG_RESULT([${WARNINGS_AS_ERRORS} (default)]) + # gcc might produce false positive results when code coverage is enabled + if test "x$enable_native_coverage" = "xyes" && test "x$TOOLCHAIN_TYPE" = "xgcc"; then + AC_MSG_RESULT([no (disabled for native code coverage)]) + WARNINGS_AS_ERRORS=false + else + AC_MSG_RESULT([${WARNINGS_AS_ERRORS} (default)]) + fi else AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument]) fi