mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
compiler/add_pragma.m:
When processing a pragma that marks a predicate or function
as external, generate an error message if that predicate or function
has any clauses.
library/profiling_builtin.m:
The predicates that the deep profiler calls at various points
in the code of profiled procedures are marked as external;
their actual implementation is in a script-generated C source file
in the runtime directory. Delete their clauses, since the compiler
would now generate error messages for their external pragmas
in the presence of those clauses.
We don't need those clauses at all, since those predicates should have
no calls to them at all in non-deep-profiling grades. (They are not
documented, and any existing calls to them would have immediately
aborted the program.)
tests/invalid/external2.{m,err_exp}:
A test case for the new functionality.
tests/invalid/Mmakefile:
Enable the new test.
5 lines
209 B
Plaintext
5 lines
209 B
Plaintext
external2.m:019: The predicate `p'/2 has clauses, so it cannot be marked as
|
|
external2.m:019: external.
|
|
external2.m:020: The function `f'/2 has clauses, so it cannot be marked as
|
|
external2.m:020: external.
|