set(WPICKY "${WPICKY} -pedantic-errors")
endif()
+if(APPLE AND
+ (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6) OR
+ (CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.3))
+ set(WPICKY "${WPICKY} -Werror=partial-availability") # clang 3.6 appleclang 6.3
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+ set(WPICKY "${WPICKY} -Werror-implicit-function-declaration") # clang 1.0 gcc 2.95
+endif()
+
if(PICKY_COMPILER)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
if test "$compiler_num" -ge "500"; then
CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
fi
+ elif test "$compiler_id" = "CLANG"; then
+ CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
fi
fi
AC_SUBST(CURL_CFLAG_EXTRAS)
Install prefix: ${prefix}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
+ CFLAGS extras: ${CURL_CFLAG_EXTRAS}
CPPFLAGS: ${CPPFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
#ifdef __clang__
#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpointer-bool-conversion"
#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
#endif /* __clang__ */
dnl warn about compile-time arguments used during link-time, like
dnl -O and -g and -pedantic.
tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
+ tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
;;
#
DEC_C)
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 and above only
fi
fi
- dnl Disable pointer to bool conversion warnings since they cause
- dnl lib/securetransp.c cause several warnings for checks we want.
- dnl This option should be placed after -Wconversion.
- tmp_CFLAGS="$tmp_CFLAGS -Wno-pointer-bool-conversion"
;;
#
DEC_C)