[m-rev.] trivial diff: fix some compiler warnings in .rt grades

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 19 18:54:33 AEDT 2004


Estimated hours taken: 0.25
Branches: main

runtime/mercury_type_info.h:
	Fix a bug in *.rt grades: cast the results of MR_mkword() to MR_Word.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.110
diff -u -d -r1.110 mercury_type_info.h
--- runtime/mercury_type_info.h	3 Feb 2004 05:40:05 -0000	1.110
+++ runtime/mercury_type_info.h	18 Feb 2004 08:16:13 -0000
@@ -386,14 +386,14 @@
     */
   #define MR_ENUM_TAG         MR_mktag(MR_FIRST_UNRESERVED_RAW_TAG)
  
-  #define MR_COMPARE_EQUAL    MR_mkword(MR_ENUM_TAG, MR_mkbody(0))
-  #define MR_COMPARE_LESS     MR_mkword(MR_ENUM_TAG, MR_mkbody(1))
-  #define MR_COMPARE_GREATER  MR_mkword(MR_ENUM_TAG, MR_mkbody(2))         
+  #define MR_COMPARE_EQUAL    ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(0)))
+  #define MR_COMPARE_LESS     ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(1)))
+  #define MR_COMPARE_GREATER  ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(2)))
 
-  #define MR_BOOL_NO          MR_mkword(MR_ENUM_TAG, MR_mkbody(0))
-  #define MR_BOOL_YES         MR_mkword(MR_ENUM_TAG, MR_mkbody(1))
+  #define MR_BOOL_NO          ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(0)))
+  #define MR_BOOL_YES         ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(1)))
 
-  #define MR_UNBOUND          MR_mkword(MR_ENUM_TAG, MR_mkbody(0))
+  #define MR_UNBOUND          ((MR_Word) MR_mkword(MR_ENUM_TAG, MR_mkbody(0)))
 #else
   #define MR_COMPARE_EQUAL    0
   #define MR_COMPARE_LESS     1

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