[m-dev.] warning suppression pragmas

Julien Fischer jfischer at opturion.com
Mon May 27 15:11:33 AEST 2013

Hi all,

The following concerns the first of the changes listed in this diff
of Zoltan's:


along with my (unaddressed) review comments concerning it:


Zoltan's diff introduced the pragma `no_determinism_warning' that can be used
to suppress the warning that the compiler emits if a predicate's determinism
declaration is too lax.  The original change was committed but never

In my review comments, I suggest generalising this mechanism so that other
per-predicate warnings can be suppressed,

     :- pragma suppress_warnings(<pred>/<arity>, [<warnings>])

where <warnings> is one of: `lax_determinism' or `inferred_erroneous'.
There are a few others that would be useful to disable in some circumstances
as well, for example `unknown_format_calls'.

A modification of this proposal is to add another pragma that suppresses
module level warnings.

     :- pragma suppress_module_warnings([<module warnings>]).

Under this proposal the original, suppress_warnings/2 pragma would become:

     :- pragma suppress_pred_warnings(<pred>/<arity>, [<pred warnings>])

I am looking for feedback about whether either of my proposed generalisations
should be implemented.  (Or indeed any other feedback regarding the original


More information about the developers mailing list