mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 12:53:47 +00:00
compiler/c_util.m:
Add missing stream argument.
compiler/Mercury.options:
Fix misspelt filename that prevented the problem in c_util.m
from being automatically diagnosed.
217 lines
14 KiB
Plaintext
217 lines
14 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 2002-2009 University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
# Mercury.options - module-specific flags for Mmake and `mmc --make'.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# llds_out.m contains some sanity checking code that is usually turned off.
|
|
# However, the cost of checking whether they are turned off exceeds the cost of
|
|
# performing them, unless inlining is enabled.
|
|
MCFLAGS-ll_backend.llds_out = --inlining
|
|
|
|
# Several predicates in quantification.m contain an argument which is needed
|
|
# only to select the right mode. We want to make sure that we don't take up
|
|
# code space or execution time to pass these arguments.
|
|
MCFLAGS-hlds.quantification = --optimize-unused-args
|
|
|
|
# Delete the code that computes information needed only in trace goals
|
|
# in the common case that the trace goals are not enabled.
|
|
# typecheck_module_one_iteration should be tail recursive.
|
|
MCFLAGS-check_hlds.typecheck = --unneeded-code --optimize-constructor-last-call
|
|
|
|
# compute_goals_purity should be tail recursive.
|
|
MCFLAGS-check_hlds.purity = --optimize-constructor-last-call
|
|
|
|
# module_qualify_items_loop should be tail recursive.
|
|
MCFLAGS-parse_tree.module_qual.qualify_items = --optimize-constructor-last-call
|
|
|
|
# The predicates in these modules that could be transformed by lcmc
|
|
# are not speed-critical.
|
|
MCFLAGS-backend_libs.base_typeclass_info = --no-optimize-constructor-last-call
|
|
MCFLAGS-backend_libs.compile_target_code = --no-optimize-constructor-last-call
|
|
MCFLAGS-backend_libs.export = --no-optimize-constructor-last-call
|
|
MCFLAGS-backend_libs.interval = --no-optimize-constructor-last-call
|
|
MCFLAGS-backend_libs.matching = --no-optimize-constructor-last-call
|
|
MCFLAGS-backend_libs.saved_vars = --no-optimize-constructor-last-call
|
|
MCFLAGS-bytecode_backend.bytecode_gen = --no-optimize-constructor-last-call
|
|
MCFLAGS-check_hlds.ordering_mode_constraints \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-check_hlds.post_typecheck = --no-optimize-constructor-last-call
|
|
MCFLAGS-check_hlds.type_constraints = --no-optimize-constructor-last-call
|
|
MCFLAGS-hlds.assertion = --no-optimize-constructor-last-call
|
|
MCFLAGS-hlds.error_msg_inst = --no-optimize-constructor-last-call
|
|
MCFLAGS-hlds.hhf = --no-optimize-constructor-last-call
|
|
MCFLAGS-parse_tree.error_util = --no-optimize-constructor-last-call
|
|
MCFLAGS-parse_tree.prog_ctgc = --no-optimize-constructor-last-call
|
|
MCFLAGS-parse_tree.prog_data_foreign = --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.analysis \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.direct.choose_reuse \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.indirect \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.lbu \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.lfu \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.versions \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.rbmm.condition_renaming \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.rbmm.execution_path \
|
|
= --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.size_prof = --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.stm_expand = --no-optimize-constructor-last-call
|
|
MCFLAGS-transform_hlds.table_gen = --no-optimize-constructor-last-call
|
|
|
|
# In these files, some imports are needed only in some grades.
|
|
# Until unused_imports.m can avoid generating messages about these,
|
|
# disable the pass on these files.
|
|
MCFLAGS-libs.md4 = --no-warn-unused-imports
|
|
MCFLAGS-libs.process_util = --no-warn-unused-imports
|
|
|
|
# process_util.m uses `kill' and `struct sigaction' from <signal.h>,
|
|
# which are not available with `--ansi'.
|
|
MGNUCFLAGS-libs.process_util = --no-ansi
|
|
|
|
# make.util.m uses POSIX IPC.
|
|
MGNUCFLAGS-make.util = --no-ansi
|
|
|
|
# If intermodule optimization is enabled, we also need to use `--no-ansi'
|
|
# for the following modules, because they import process_util.
|
|
MGNUCFLAGS-make.module_dep_file = --no-ansi
|
|
MGNUCFLAGS-make.module_target = --no-ansi
|
|
MGNUCFLAGS-make.program_target = --no-ansi
|
|
|
|
MCFLAGS-check_hlds.modes = --inline-vars-threshold 10000
|
|
MCFLAGS-check_hlds.unique_modes = --inline-vars-threshold 10000
|
|
|
|
MCFLAGS-libs.process_util += --no-ansi-c
|
|
MCFLAGS-make.module_dep_file += --no-ansi-c
|
|
MCFLAGS-make.module_target += --no-ansi-c
|
|
MCFLAGS-make.program_target += --no-ansi-c
|
|
MCFLAGS-make.util += --no-ansi-c --no-halt-at-warn
|
|
|
|
# These modules provide general-purpose wrappers around string.format
|
|
# in which the format strings are known only by their callers.
|
|
MCFLAGS-transform_hlds.pd_debug = --no-warn-unknown-format-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_info = --no-warn-unknown-format-calls
|
|
|
|
MCFLAGS-backend_libs.c_util += --warn-implicit-stream-calls
|
|
MCFLAGS-check_hlds.delay_partial_inst += --warn-implicit-stream-calls
|
|
MCFLAGS-check_hlds.simplify.format_call += --warn-implicit-stream-calls
|
|
MCFLAGS-check_hlds.type_assign += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.du_type_layout += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_dependency_graph += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_out_goal += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_out_mode += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_out_module += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_out_pred += --warn-implicit-stream-calls
|
|
MCFLAGS-hlds.hlds_out_util += --warn-implicit-stream-calls
|
|
MCFLAGS-libs.mmakefiles += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.code_loc_dep += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.layout_out += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_code_addr += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_data += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_file += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_global += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_instr += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.llds_out_util += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.opt_debug += --warn-implicit-stream-calls
|
|
MCFLAGS-ll_backend.rtti_out += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_class += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_data += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_export += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_file += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_func += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_global += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_name += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_stmt += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_type += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_c_util += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_class += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_data += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_export += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_file += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_func += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_global += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_name += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_stmt += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_type += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_cs_util += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_class += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_data += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_export += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_file += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_func += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_global += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_name += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_stmt += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_type += --warn-implicit-stream-calls
|
|
MCFLAGS-ml_backend.mlds_to_java_util += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.mercury_to_mercury += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_clause += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_info += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_inst += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_pragma += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_pred_decl += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_term += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.parse_tree_out_type-repn += --warn-implicit-stream-calls
|
|
MCFLAGS-parse_tree.write_deps_file += --warn-implicit-stream-calls
|
|
MCFLAGS-recompilation += --warn-implicit-stream-calls
|
|
MCFLAGS-recompilation.usage += --warn-implicit-stream-calls
|
|
MCFLAGS-recompilation.version += --warn-implicit-stream-calls
|
|
MCFLAGS-transform_hlds.intermod += --warn-implicit-stream-calls
|
|
MCFLAGS-transform_hlds.unneeded_code += --warn-implicit-stream-calls
|
|
|
|
# Keep all modules' contents in a consistent order, except these (for now).
|
|
MCFLAGS-check_hlds.abstract_mode_constraints += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-check_hlds.mode_info += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-check_hlds.mode_util += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-check_hlds.polymorphism += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-hlds.goal_util += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-hlds.inst_graph += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-libs.options += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-ll_backend.code_info += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-ll_backend.code_loc_dep += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-ll_backend.opt_util += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-ll_backend.var_locn += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-mode_robdd.tfeirn += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-parse_tree.prog_ctgc += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.complexity += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.datastruct += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.fixpoint_table += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.selector += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.domain += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.structure_reuse.indirect += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.structure_sharing.analysis += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.structure_sharing.domain += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.ctgc.util += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.pd_debug += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.pd_info += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.pd_term += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.pd_util += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.rbmm.points_to_graph += --no-warn-inconsistent-pred-order-clauses
|
|
MCFLAGS-transform_hlds.rbmm.region_liveness_info += --no-warn-inconsistent-pred-order-clauses
|
|
|
|
# Bug workarounds.
|
|
|
|
# This works around bug 48 in Mantis.
|
|
# (This has been fixed, and the workaround can be removed once new compilers
|
|
# have been installed.)
|
|
MCFLAGS-analysis += --no-common-struct
|
|
|
|
# XXX work around a bug that sometimes appears at -O4 and above.
|
|
# mmc -r analysis.file.c -s asm_fast.gc -O4 --intermodule-optimisation
|
|
MCFLAGS-analysis.file += --no-optimise-higher-order
|
|
|
|
# This works around bug 32 in Mantis.
|
|
MCFLAGS-check_hlds.check_typeclass += --no-loop-invariants
|
|
|
|
# This is the same bug as tests/valid/ho_and_type_spec_bug2.
|
|
MCFLAGS-mode_robdd.tfeirn += -O3
|
|
MCFLAGS-mode_robdd.implications += -O0
|