[m-dev.] diff: fix store.m hlc.gc bug

Peter Ross peter.ross at miscrit.be
Wed Aug 9 19:35:06 AEST 2000


Hi,


===================================================================


Estimated hours taken: 0.5

Fixes the bug:
	error C2296: '&' : illegal, left operand has type 'void *'
when compiling in grade hlc.gc using MSVC.

library/store.m:
	Add a cast to (MR_Word) before passing an MR_Box value to
	MR_strip_tag.
	Change some occurences of Word to MR_Word.


Index: store.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/store.m,v
retrieving revision 1.22
diff -u -r1.22 store.m
--- store.m	2000/05/08 13:48:38	1.22
+++ store.m	2000/08/09 09:30:33
@@ -427,8 +427,8 @@
 		will_not_call_mercury,
 "{
 	/* unsafe - does not check type & arity, won't handle no_tag types */
-	Word *Ptr = (Word *) MR_strip_tag(Ref);
-	ArgRef = (Word) &Ptr[Arg];
+	MR_Word *Ptr = (MR_Word *) MR_strip_tag((MR_Word) Ref);
+	ArgRef = (MR_Word) &Ptr[Arg];
 	S = S0;
 }").
 
@@ -436,7 +436,7 @@
 				S0::di, S::uo), will_not_call_mercury,
 "{
 	/* unsafe - does not check type & arity, won't handle no_tag types */
-	Word *Ptr = (Word *) MR_strip_tag(Val);
-	ArgRef = (Word) &Ptr[Arg];
+	MR_Word *Ptr = (MR_Word *) MR_strip_tag((MR_Word) Val);
+	ArgRef = (MR_Word) &Ptr[Arg];
 	S = S0;
 }").

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