[commit: ghc] master: Add some missing parentheses to mkDerivedConstants.c (0c7f0c2)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0c7f0c2cc2c3746cc8ecd8efd44963c65cb57270

>---------------------------------------------------------------

commit 0c7f0c2cc2c3746cc8ecd8efd44963c65cb57270
Author: Ian Lynagh <[email protected]>
Date:   Fri Oct 26 20:07:47 2012 +0100

    Add some missing parentheses to mkDerivedConstants.c
    
    This was breaking the build on s390. Not sure why it didn't bite on
    any other platforms.

>---------------------------------------------------------------

 includes/mkDerivedConstants.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index a58c500..1393112 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -46,7 +46,7 @@ enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haske
         printf("    , pc_OFFSET_" str " :: Int\n");                         \
         break;                                                              \
     case Gen_Haskell_Value:                                                 \
-        printf("    , pc_OFFSET_" str " = %" PRIdPTR "\n", (intptr_t)offset); \
+        printf("    , pc_OFFSET_" str " = %" PRIdPTR "\n", (intptr_t)(offset)); \
         break;                                                              \
     case Gen_Haskell_Wrappers:                                              \
         printf("oFFSET_" str " :: DynFlags -> Int\n");                      \
@@ -56,7 +56,7 @@ enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haske
         printf("    oFFSET_" str ",\n");                                    \
         break;                                                              \
     case Gen_Header:                                                        \
-        printf("#define OFFSET_" str " %" PRIdPTR "\n", (intptr_t)offset);  \
+        printf("#define OFFSET_" str " %" PRIdPTR "\n", (intptr_t)(offset));  \
         break;                                                              \
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.