diff --git a/Makefile b/Makefile index 5c83ccae80c44dd2fb41bedef0a8cf7ac77d70fd..e4c5dcf11ad0fd4cbaa0dda0e2dc33acc1360d3d 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,6 @@ config.sed: VERSION share/Makefile.config share/Makefile.common Makefile configu @echo "s|@VERSION_CODENAME@|$(VERSION_CODENAME)|" >> $@ @echo "s|@MAJOR_VERSION@|$(MAJOR_VERSION)|g" >> $@ @echo "s|@MINOR_VERSION@|$(MINOR_VERSION)|g" >> $@ - @echo "s|@WARNINGS@|$(WARNINGS)|" >> $@ @echo "s|@FRAMAC_DEFAULT_CPP@|$(FRAMAC_DEFAULT_CPP)|" >> $@ @echo "s|@FRAMAC_DEFAULT_CPP_ARGS@|$(FRAMAC_DEFAULT_CPP_ARGS)|" >> $@ @echo "s|@FRAMAC_GNU_CPP@|$(FRAMAC_GNU_CPP)|" >> $@ diff --git a/share/Makefile.common b/share/Makefile.common index c3f8cd6de2d6a6e10f0f5c0e8bc248c0c165f7ee..7ae41b048fe8f32f9fe51d77717aa19b819a1aa7 100644 --- a/share/Makefile.common +++ b/share/Makefile.common @@ -32,60 +32,6 @@ include $(MAKECONFIG_DIR)/Makefile.config # Flags # ################## -# Flags to be used by ocamlc and ocamlopt when compiling Frama-C -# itself. For development versions, we add -warn-error for most -# warnings -warn-error has effect only for warnings that are -# explicitly set using '-w'. -ifeq ($(DEVELOPMENT),yes) -# Most warnings are activated by default. Those settings are inherited -# in the compilation of external plugins. -# - 4 (fragile pattern-matching) only make sense when adding a node to a type. -# OCaml GPR #1071 will make it usable -# - 6 (omit label in application) would make code clearer, but requires -# refactoring before being enabled. -# - 9 (missing field in record pattern) is much too heavy. Most of the time -# not all fields are relevant in pattern-matching Frama-C's AST. -# - 40 (constructor or label name used out of scope) -# - 41 (ambiguous constructor or label name) -# - 42 (Disambiguated constructor or label name) -# these three warnings prevents type-based disambiguation, -# a feature which is seen as a good thing by many developers -# - 44 (open shadows an identifier) -# - 45 (open shadows a label or constructor): While the use of open directives -# is supposed to stay small, it should still be possible to open modules -# that share common names, barring some mechanism to open only parts of a -# module. -# - 48 (implicit elimination of optional arguments): makes use of functions -# with optional arguments heavier in higher-order context -# - 67 (unused module parameter in functor signature): naming all parameters -# in functor signatures is a common practice that seems harmless. Warning 60 -# ensures that named functor parameters are indeed used in the implementation. -WARNINGS ?= +a-4-9-40-41-42-44-45-48-67 - -# - 3 (deprecated feature) cannot always be avoided for OCaml stdlib when -# supporting several OCaml versions -# - 4 (fragile pattern matching) will be activated when adding a node (see -# above), in order to let the developer decide whether a case should be -# added on relevant fragile pattern or not: a matching might very well stay -# fragile without triggering an error. -# - 3x (various categories of unused identifiers) it is sometimes useful to -# let code compile despite such warnings when in the middle of a development. -# On the other hand, a completed feature should not trigger such warnings. -# - 58 (missing cmx) is triggered by some versions of external libraries. -# Situation should probably improve as these libraries get updated, leading -# to treat this warning as error. -WARN_ERROR ?= -warn-error +a-3-4-32-33-34-35-36-37-38-39-58 - -else - -WARNINGS ?= -a - -endif #DEVELOPMENT - -FLAGS = $(WARNINGS) $(WARN_ERROR) $(OCAML_ANNOT_OPTION) -strict-sequence \ - -safe-string -DEBUG = -g - ############# # Verbosing # ############# diff --git a/src/kernel_internals/runtime/dump_config.ml b/src/kernel_internals/runtime/dump_config.ml index 5dce2b63232ba0227c595e394e120c79cc8b50d2..d932f5a2f6da166f10144d7094a1c634d2fd892d 100644 --- a/src/kernel_internals/runtime/dump_config.ml +++ b/src/kernel_internals/runtime/dump_config.ml @@ -53,8 +53,8 @@ let dump_to_json () = "is_gui", `Bool Fc_config.is_gui ; (* "lablgtk", `String Fc_config.lablgtk ; * "ocamlc", `String Fc_config.ocamlc ; - * "ocamlopt", `String Fc_config.ocamlopt ; *) - "ocaml_wflags", `String Fc_config.ocaml_wflags ; + * "ocamlopt", `String Fc_config.ocamlopt ; + * "ocaml_wflags", `String Fc_config.ocaml_wflags ; *) "datadir", `String (Fc_config.datadir:>string) ; "datadirs", list string (Filepath.Normalized.to_string_list Fc_config.datadirs) ; diff --git a/src/kernel_internals/runtime/fc_config.ml.in b/src/kernel_internals/runtime/fc_config.ml.in index 30d792b08e04dd7b55879cd8ecdf8930bed0654a..2889e6566f1ef4c84261db87794909a2b1c95ca4 100644 --- a/src/kernel_internals/runtime/fc_config.ml.in +++ b/src/kernel_internals/runtime/fc_config.ml.in @@ -32,7 +32,6 @@ let minor_version = @MINOR_VERSION@ let is_gui = Frama_c_very_first.Gui_init.is_gui -let ocaml_wflags = "@WARNINGS@" let datadirs = (List.map Filepath.Normalized.of_string Config_data.Sites.share) let datadir = List.hd (List.rev datadirs) diff --git a/src/kernel_internals/runtime/fc_config.mli b/src/kernel_internals/runtime/fc_config.mli index 1d442453ffbddde56beb901745e002b8010ae6d7..181574f0a5ac6f285b080e1ae2db76952393de3c 100644 --- a/src/kernel_internals/runtime/fc_config.mli +++ b/src/kernel_internals/runtime/fc_config.mli @@ -48,10 +48,6 @@ val is_gui: bool @since frama-c-trunk not anymore a reference *) -val ocaml_wflags: string -(** Warning flags used when compiling Frama-C. - @since Chlorine-20180501 *) - val datadirs: Filepath.Normalized.t list (** Directories where architecture independent files are in order of priority.