[m-rev.] diff: runtime/mercury.c bug fix

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jan 4 16:17:57 AEDT 2002


Estimated hours taken: 0.5
Branches: main

runtime/mercury.c:
	Fix a bug where the definition of MR_unbox_float()
	was inside `#if defined(MR_AVOID_MACROS) || !defined(__GNUC__)'
	when it ought to be inside just `#if defined(MR_AVOID_MACROS)';
	this caused problems when compiling with C compilers other
	than GNU C, because the macro definition conflicts with the
	function definition, leading to a syntax error in the function
	definition.

Workspace: /mnt/earth/home/earth/fjh/ws-earth4/mercury
Index: runtime/mercury.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.c,v
retrieving revision 1.28
diff -u -d -r1.28 mercury.c
--- runtime/mercury.c	2001/12/27 13:17:12	1.28
+++ runtime/mercury.c	2002/01/04 00:48:34
@@ -878,6 +878,10 @@
 	}
 )
 
+#endif /* MR_AVOID_MACROS || !__GNUC__ */
+
+#if defined(MR_AVOID_MACROS)
+
 MR_OUTLINE_DEFN(
 	MR_Float
 	MR_unbox_float(MR_Box b)
@@ -887,7 +891,7 @@
 	}
 )
 
-#endif /* MR_AVOID_MACROS || !__GNUC__ */
+#endif /* MR_AVOID_MACROS */
 
 /*
 ** This is exactly the same as MR_box_float(), except that

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