2024-11-24 13:23 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000507mercuryFeature Requestpublic2020-05-01 17:52
Reporterzs 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000507: detect missing foreign_procs
DescriptionWe should add a compiler option that causes the compiler
to generate a warning for every procedure that passes neither
of the following tests:

Test 1: it has a Mercury definition.

Test 2: it has a definition in each of C, Java, C# and (maybe) Erlang.

The test is for procedures, not predicate or functions,
because foreign_procs are for procedures, and with mode-specific
clauses, Mercury clauses can be as well. However, if a predicate
or function has two or more procedures, and they all fail both tests,
we should probably generate one message, not several.

At the moment, I believe a substantial chunk of the test case failures
in C# and Java grades are caused by missing foreign_procs for these
languages that this option should help us find more easily. More important,
enabling this warning for all modules in the library, which is compiled with
--halt-at-warn, should help us not just to fix this, but *keep* it fixed.

As for the option name, how about --warn-missing-foreign-procs?
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2020-05-01 17:52 zs New Issue
+Issue History