diff options
author | Antonin Décimo <antonin@tarides.com> | 2023-01-02 16:26:21 +0100 |
---|---|---|
committer | Antonin Décimo <antonin@tarides.com> | 2023-01-12 14:58:35 +0100 |
commit | 567cf9f6ffd2a954e5f773d05530c30aeb381f68 (patch) | |
tree | b7e8487fea5dd06b81212829f465a3955bdff993 | |
parent | 102d9606965dc7e393114a35c4510a603c91528e (diff) | |
download | ocaml-567cf9f6ffd2a954e5f773d05530c30aeb381f68.tar.gz |
Enable stricter C99 warnings
Fedora is considering moving all its packages to C99 and enabling
stricter C99 warnings. OCaml has already moved to a compiler requiring
C11 features, let's enable these warnings on GCC-compatible compilers.
Some of the warnings on the following article are already covered by
-Wall and -Werror.
Reference: [Modernizing Fedora's C code][1].
[1]: https://lwn.net/Articles/913505/
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -13656,7 +13656,8 @@ case $ocaml_cv_cc_vendor in #( *) : outputobj='-o ' warn_error_flag='-Werror' - cc_warnings='-Wall' ;; + cc_warnings="-Wall -Wint-conversion -Wstrict-prototypes \ +-Wold-style-definition" ;; esac case $enable_warn_error,true in #( diff --git a/configure.ac b/configure.ac index e7956cb6c8..cab28adb0b 100644 --- a/configure.ac +++ b/configure.ac @@ -688,7 +688,8 @@ AS_CASE([$ocaml_cv_cc_vendor], cc_warnings=''], [outputobj='-o ' warn_error_flag='-Werror' - cc_warnings='-Wall']) + cc_warnings="-Wall -Wint-conversion -Wstrict-prototypes \ +-Wold-style-definition"]) AS_CASE([$enable_warn_error,OCAML__DEVELOPMENT_VERSION], [yes,*|,true], |