bug in type_info.c

Fergus Henderson fjh at kryten.cs.mu.OZ.AU
Wed Feb 19 02:39:28 AEDT 1997


Hi Tyson,

Can you please review the following diff?
Also, could you please add some more tests for type_info.c,
including one that covers this case?
I spotted this one only because gcc warned about it.

runtime/type_info.c:
	Fix a bug where the return value from a recursive call to
	type_info() was ignored.

Index: deep_copy.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/deep_copy.c,v
retrieving revision 1.8
diff -u -r1.8 deep_copy.c
--- 1.8	1997/02/18 03:06:29
+++ deep_copy.c	1997/02/18 15:33:44
@@ -235,7 +235,8 @@
             /* note: we treat no_tag types just like equivalences */
 
             if ((Word) entry_value < TYPELAYOUT_MAX_VARINT) {
-                deep_copy(data, (Word *) type_info[(Word) entry_value],
+                new_data = deep_copy(data,
+		    (Word *) type_info[(Word) entry_value],
                     lower_limit, upper_limit);
             } else {
                 new_type_info = make_type_info(type_info, 


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



More information about the developers mailing list