[m-rev.] for review: --warn-potentially-ambiguous-pragma

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Jun 15 16:23:38 AEST 2021


For review by anyone.

This implements my proposal for these warnings, i.e. it generates
warnings whereever a pragma specifies a symname/arity pair
but does not specify pred vs func. This means that it will
generate warnings for pragmas that are not actually ambiguous
due to the fact that either only a predicate, or only a function,
exists with that symname/arity pair. While Peter's preferred option,
a warning only for actually ambiguous pragmas, may require
less work up front to address the results, it feels less elegant to me.

The second diff (which includes the first, which I did not bother
to subtract) removes all the potential ambiguities in the Mercury system
pointed out by the new warning. These would be committed
separately. The change to configure.ac would require the
installed compiler to support pred(...) and func(...) around
symname/arity pairs in pragmas. That capability was committed
on may 6.

After a few days, to allow for a new rotd and for people to install
an updated compiler, I plan to add the new option to LIB_FLAGS.in,
COMP_FLAGS.in and all the other similar files.

Any objections?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.wpap
Type: application/octet-stream
Size: 524 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20210615/013ea235/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.wpap
Type: application/octet-stream
Size: 10647 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20210615/013ea235/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.wpap_all.gz
Type: application/x-gzip
Size: 69774 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20210615/013ea235/attachment-0001.bin>


More information about the reviews mailing list