Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000507 | mercury | Feature Request | public | 2020-05-01 17:52 | 2020-05-01 17:52 |
Reporter | zs | ||||
---|---|---|---|---|---|
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000507: detect missing foreign_procs | ||||
Description | We 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? | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
There are no notes attached to this issue. |
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2020-05-01 17:52 | zs | New Issue |