From c3b09e4f29f5dbb82708b73e5730be4e2d9ebf2f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 8 Dec 2023 17:16:40 -0500 Subject: [PATCH 1/2] Enable warn-error by default --- ocaml/configure | 12 +++++++----- ocaml/configure.ac | 9 +++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ocaml/configure b/ocaml/configure index 23472daf252..e1e8e56d448 100755 --- a/ocaml/configure +++ b/ocaml/configure @@ -1632,7 +1632,7 @@ Optional Features: headers --disable-stdlib-manpages do not build or install the library man pages - --enable-warn-error treat C compiler warnings as errors + --disable-warn-error do not treat C compiler warnings as errors --disable-flat-float-array do not use flat float arrays --disable-function-sections @@ -13646,8 +13646,8 @@ lib_dynlink=true if test x"$enable_runtime5" = x"yes" then : - otherlibraries = "$otherlibraries runtime_events" - lib_runtime_events = true + otherlibraries="$otherlibraries runtime_events" + lib_runtime_events=true fi if test x"$enable_unix_lib" != "xno" @@ -13767,8 +13767,10 @@ case $ocaml_cv_cc_vendor in #( -Wold-style-definition" ;; esac -case $enable_warn_error,false in #( - yes,*|,true) : +case $enable_warn_error in #( + no) : + ;; #( + *) : cc_warnings="$cc_warnings $warn_error_flag" ;; #( *) : ;; diff --git a/ocaml/configure.ac b/ocaml/configure.ac index 35c2a2ab679..2b09175cdc4 100644 --- a/ocaml/configure.ac +++ b/ocaml/configure.ac @@ -474,8 +474,8 @@ AC_ARG_ENABLE([stdlib-manpages], [do not build or install the library man pages])]) AC_ARG_ENABLE([warn-error], - [AS_HELP_STRING([--enable-warn-error], - [treat C compiler warnings as errors])]) + [AS_HELP_STRING([--disable-warn-error], + [do not treat C compiler warnings as errors])]) AC_ARG_VAR([WINDOWS_UNICODE_MODE], [how to handle Unicode under Windows: ansi, compatible]) @@ -750,8 +750,9 @@ AS_CASE([$ocaml_cv_cc_vendor], cc_warnings="-Wall -Wno-pragmas -Wint-conversion -Wstrict-prototypes \ -Wold-style-definition"]) -AS_CASE([$enable_warn_error,OCAML__DEVELOPMENT_VERSION], - [yes,*|,true], +AS_CASE([$enable_warn_error], + [no], [], + [*], [cc_warnings="$cc_warnings $warn_error_flag"]) # We select high optimization levels, provided we can turn off: From e86e76d0e3dcc421a7ce869ad434bfae2f76aa6f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 11 Dec 2023 12:25:55 -0500 Subject: [PATCH 2/2] disable warn error on mac os --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c627f76779d..82ad962b7fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: build_ocamlparam: _,ocamlcfg=0 - name: flambda2_macos - config: --enable-middle-end=flambda2 + config: --enable-middle-end=flambda2 --disable-warn-error os: macos-latest - name: irc