[m-rev.] diff: Reduce severity of --warn-ambiguous-pragmas.
Peter Wang
novalazy at gmail.com
Thu Aug 4 15:40:51 AEST 2022
compiler/add_pragma.m:
Reduce severity of --warn-ambiguous-pragmas to a warning instead of
an error.
diff --git a/compiler/add_pragma.m b/compiler/add_pragma.m
index 7ef6efa19..e2b6af11d 100644
--- a/compiler/add_pragma.m
+++ b/compiler/add_pragma.m
@@ -1785,7 +1785,7 @@ get_matching_pred_ids(ModuleInfo, Pragma, RequireOneMatch, PragmaAllowsModes,
unqual_sym_name_arity(SNA), suffix(":"), nl,
words("warning: ambiguous name could refer to"),
words("either a predicate or a function."), nl],
- ActualSpec = simplest_spec($pred, severity_error,
+ ActualSpec = simplest_spec($pred, severity_warning,
phase_parse_tree_to_hlds, Context, ActualPieces),
% There is no point in printing WarnSpecs warning about
% *possible* ambiguity when ActualSpec reports a warning
--
2.37.1
More information about the reviews
mailing list