[m-dev.] diff: fix bug with tabling pragmas and mode inference
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Oct 29 17:14:44 AEST 1999
Estimated hours taken: 0.25
compiler/make_hlds.m:
Fix a bug: `pragma loop_check' declarations for predicates
whose modes were inferred were being silently ignored.
I changed it so it now reports an error if there are tabling
pragmas for procedures with no declared modes.
Workspace: /home/mercury0/fjh/mercury
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.311
diff -u -d -r1.311 make_hlds.m
--- make_hlds.m 1999/10/25 03:49:11 1.311
+++ make_hlds.m 1999/10/29 07:11:50
@@ -3680,6 +3680,19 @@
io__write_string(".\n")
)
;
+ { ExistingProcs = [] }
+ ->
+ { module_info_incr_errors(ModuleInfo1, ModuleInfo) },
+ prog_out__write_context(Context),
+ io__write_string("Error: `:- pragma "),
+ io__write_string(EvalMethodS),
+ io__write_string("' declaration for\n"),
+ prog_out__write_context(Context),
+ io__write_string(" "),
+ hlds_out__write_simple_call_id(PredOrFunc,
+ PredName/Arity),
+ io__write_string(" with no declared modes.\n")
+ ;
{ set_eval_method_list(ExistingProcs, EvalMethod,
Procs0, Procs) },
{ pred_info_set_procedures(PredInfo0, Procs,
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list