[m-rev.] diff: fix signed vs unsigned type error

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 12 16:07:27 AEST 2003


Estimated hours taken: 1
Branches: main

Fix a bug where we were generating type-incorrect C code when debugging
was enabled.  This resulted in compilation errors when compiling with lcc.

compiler/layout_out.m:
	Define array element type for the head_var_names array as
	unsigned (MR_uint_least16_t) rather than signed (MR_int_least16_t).

Workspace: /mnt/ceres/home/ceres/fjh/mercury
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.25
diff -u -d -r1.25 layout_out.m
--- compiler/layout_out.m	27 May 2003 05:57:12 -0000	1.25
+++ compiler/layout_out.m	12 Aug 2003 05:03:21 -0000
@@ -316,7 +316,7 @@
 output_layout_name_storage_type_name(proc_layout_head_var_nums(ProcLabel),
 		_BeingDefined) -->
 	io__write_string("static const "),
-	io__write_string("MR_int_least16_t "),
+	io__write_string("MR_uint_least16_t "),
 	output_layout_name(proc_layout_head_var_nums(ProcLabel)),
 	io__write_string("[]").
 output_layout_name_storage_type_name(proc_layout_var_names(ProcLabel),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list