[m-dev.] trivial diff: MLDS back-end: fix tabling warning

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 16 05:38:36 AEST 2000


Estimated hours taken: 0.5

compiler/ml_unify_gen.m:
	Fix a bug that resulted in a gcc warning when compiling
	code using tabling: add a missing cast.

Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/ml_unify_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_unify_gen.m,v
retrieving revision 1.7
diff -u -d -r1.7 ml_unify_gen.m
--- compiler/ml_unify_gen.m	2000/05/10 18:06:57	1.7
+++ compiler/ml_unify_gen.m	2000/05/15 19:34:36
@@ -309,8 +309,11 @@
 		PredLabel, PredModule) },
 	{ DataAddr = data_addr(PredModule,
 			tabling_pointer(PredLabel - ProcId)) },
+	ml_variable_type(Var, VarType),
 	{ MLDS_Statement = ml_gen_assign(VarLval, 
-		const(data_addr_const(DataAddr)), Context) }.
+		unop(cast(mercury_type(VarType)),
+			const(data_addr_const(DataAddr))),
+		Context) }.
 
 ml_gen_construct_rep(code_addr_constant(PredId, ProcId), _ConsId,
 		Var, Args, _ArgModes, Context, [], [MLDS_Statement]) -->

-- 
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