patch applied (ghc): second attempt to fix C compiler warnings with -fhpc

Simon Marlow simonmar at microsoft.com
Mon Oct 22 05:52:16 EDT 2007


Fri Oct 19 06:32:43 PDT 2007  Simon Marlow <simonmar at microsoft.com>
  * second attempt to fix C compiler warnings with -fhpc
  The hs_hpc_module() prototype in RtsExternal.h didn't match its usage:
  we were passing StgWord-sized parameters but the prototype used C
  ints.  I think it accidentally worked because we only ever passed
  constants that got promoted.  The constants unfortunately were
  sometimes negative, which caused the C compiler to emit warnings.
  
  I suspect PprC.pprHexVal may be wrong to emit negative constants in
  the generated C, but I'm not completely sure.  Anyway, it's easy to
  fix this in CgHpc, which is what I've done.
  

    M ./compiler/codeGen/CgHpc.hs -2 +5
    M ./includes/RtsExternal.h -4 +4



More information about the Cvs-ghc mailing list