[m-users.] mmc --make giving strange warnings/errors

Paul Bone paul at bone.id.au
Sun Jan 12 11:45:57 AEDT 2014

On Sat, Jan 11, 2014 at 10:56:33PM +0100, Kilian Evang wrote:
> Hi all,
> I've recently started around playing with Mercury and am concerned about
> strange warnings/errors I get for some programs when trying to mmc
> --make them. I've attached a minimal example (test.m) and the error
> output I get (test.err).
> In this case, it seems to be the type declaration in the implementation
> part that triggers the error. If I remove it or move it to the interface
> part, the program compiles quietly.
> As far as I can tell, the generation of working executables is not
> affected, it's just perplexing and worrying.
> Any ideas what is wrong?

Hi Kilian,

We're pleased that you're giving Mercury a try and are happy to receive
feedback like this.

In this case we're aware of the problem, it is bug #303 in our bugtracker:

The short answer is these warnings are harmless but annoying.

As you're probably aware Mercury (mostly) works by generating C code that is
then compiled by a C compiler such as GCC.  These warnings are coming from
GCC, in fact GCC emits many warnings for C code generated by the Mercury
compiler.  Mercury will pass options to GCC for warnings that can safely be
disabled and filter the output of GCC to hide any warnings that cannot be
disabled but can safely be ignored.  Therefore we have to maintain
compatibility with newer versions of GCC and any new types or formats of
warnings, which is what this is.  GCC 4.8 added more information in some of
it's warnings that Mercury doesn't yet know how to disable or filter out.
We plan to fix this bug in the next release of Mercury.

All the best.

Paul Bone

More information about the users mailing list