Files
mercury/tests/invalid/external2.err_exp
Zoltan Somogyi f504610220 Generate errors for marking procedures with clauses as external.
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.
2019-11-27 12:42:46 +11:00

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.