Skip to content

Commit 03bfb21

Browse files
authored
Enable warn-error by default (#2140)
* Enable warn-error by default * disable warn error on mac os
1 parent f79daef commit 03bfb21

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
disable_testcases: 'ocaml/testsuite/tests/typing-local/regression_cmm_unboxing.ml ocaml/testsuite/tests/int64-unboxing/test.ml'
6262

6363
- name: flambda2_macos
64-
config: --enable-middle-end=flambda2
64+
config: --enable-middle-end=flambda2 --disable-warn-error
6565
os: macos-latest
6666

6767
- name: irc

ocaml/configure

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ocaml/configure.ac

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ AC_ARG_ENABLE([stdlib-manpages],
476476
[do not build or install the library man pages])])
477477

478478
AC_ARG_ENABLE([warn-error],
479-
[AS_HELP_STRING([--enable-warn-error],
480-
[treat C compiler warnings as errors])])
479+
[AS_HELP_STRING([--disable-warn-error],
480+
[do not treat C compiler warnings as errors])])
481481

482482
AC_ARG_VAR([WINDOWS_UNICODE_MODE],
483483
[how to handle Unicode under Windows: ansi, compatible])
@@ -758,8 +758,9 @@ AS_CASE([$ocaml_cv_cc_vendor],
758758
cc_warnings="-Wall -Wno-pragmas -Wint-conversion -Wstrict-prototypes \
759759
-Wold-style-definition"])
760760

761-
AS_CASE([$enable_warn_error,OCAML__DEVELOPMENT_VERSION],
762-
[yes,*|,true],
761+
AS_CASE([$enable_warn_error],
762+
[no], [],
763+
[*],
763764
[cc_warnings="$cc_warnings $warn_error_flag"])
764765

765766
# We select high optimization levels, provided we can turn off:

0 commit comments

Comments
 (0)