Skip to content

Miscellaneous fixes to validate on PPC Mac OS X

The attached patches, (in-?)conveniently separated by affected file, fix the following warnings that have prevented a successful validate on PPC Mac OS X recently:

/Users/thorkilnaur/tn/install/ghc-6.6-for-buildbot-20070221_1000/bin/ghc -Werror -H64m -Onot -fasm  -istage1/utils  -istage1/basicTypes  -istage1/types  -istage1/hsSyn  -istage1/prelude  -istage1/rename  -istage1/typecheck  -istage1/deSugar  -istage1/coreSyn  -istage1/vectorise  -istage1/specialise  -istage1/simplCore  -istage1/stranal  -istage1/stgSyn  -istage1/simplStg  -istage1/codeGen  -istage1/main  -istage1/profiling  -istage1/parser  -istage1/cprAnalysis  -istage1/ndpFlatten  -istage1/iface  -istage1/cmm  -istage1/nativeGen -Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage1 -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix -ignore-package lang -recomp -Rghc-timing -O -fasm -H16M '-#include "cutils.h"' -DUSING_COMPAT -i../compat -ignore-package Cabal    -c nativeGen/RegCoalesce.hs -o stage1/nativeGen/RegCoalesce.o  -ohi stage1/nativeGen/RegCoalesce.hi

nativeGen/RegAllocLinear.hs:161:11:
    Warning: Defined but not used: `x'

nativeGen/RegAllocLinear.hs:161:15:
    Warning: Defined but not used: `i'

Fixing this leads to:

/Users/thorkilnaur/tn/install/ghc-6.6-for-buildbot-20070221_1000/bin/ghc -Werror -H64m -Onot -fasm  -istage1/utils  -istage1/basicTypes  -istage1/types  -istage1/hsSyn  -istage1/prelude  -istage1/rename  -istage1/typecheck  -istage1/deSugar  -istage1/coreSyn  -istage1/vectorise  -istage1/specialise  -istage1/simplCore  -istage1/stranal  -istage1/stgSyn  -istage1/simplStg  -istage1/codeGen  -istage1/main  -istage1/profiling  -istage1/parser  -istage1/cprAnalysis  -istage1/ndpFlatten  -istage1/iface  -istage1/cmm  -istage1/nativeGen -Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage1 -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix -ignore-package lang -recomp -Rghc-timing -O -fasm -H16M '-#include "cutils.h"' -DUSING_COMPAT -i../compat -ignore-package Cabal    -c nativeGen/RegAllocLinear.hs -o stage1/nativeGen/RegAllocLinear.o  -ohi stage1/nativeGen/RegAllocLinear.hi

nativeGen/RegAllocLinear.hs:157:0:
    Warning: Pattern match(es) are non-exhaustive
             In the definition of `getFreeRegs':
                 Patterns not matched: _ (FreeRegs _ _)

Then there is:

/Users/thorkilnaur/tn/install/ghc-6.6-for-buildbot-20070221_1000/bin/ghc -Werror -H64m -Onot -fasm  -istage1/utils  -istage1/basicTypes  -istage1/types  -istage1/hsSyn  -istage1/prelude  -istage1/rename  -istage1/typecheck  -istage1/deSugar  -istage1/coreSyn  -istage1/vectorise  -istage1/specialise  -istage1/simplCore  -istage1/stranal  -istage1/stgSyn  -istage1/simplStg  -istage1/codeGen  -istage1/main  -istage1/profiling  -istage1/parser  -istage1/cprAnalysis  -istage1/ndpFlatten  -istage1/iface  -istage1/cmm  -istage1/nativeGen -Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage1 -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix -ignore-package lang -recomp -Rghc-timing -O -fasm -H16M '-#include "cutils.h"' -DUSING_COMPAT -i../compat -ignore-package Cabal    -c nativeGen/RegAllocStats.hs -o stage1/nativeGen/RegAllocStats.o  -ohi stage1/nativeGen/RegAllocStats.hi

nativeGen/RegAllocStats.hs:327:3:
    Warning: Pattern match(es) are non-exhaustive
             In a case alternative: Patterns not matched: RcDouble

There are also warnings compiling C code:

../compiler/ghc-inplace -optc-Werror -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -Werror -H64m -Onot -fasm -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint   -optc-funroll-loops  -c sm/Evac.c -o sm/Evac.o
cc1: warnings being treated as errors

In file included from sm/Evac.c:17:0:

sm/Evac.h:21:0:  warning: 'regparm' attribute directive ignored

sm/Evac.c:315:0:  warning: 'regparm' attribute directive ignored

As well as:

../compiler/ghc-inplace -optc-Werror -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-g -optc-O0 -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -Werror -H64m -Onot -fasm  -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint  -hisuf debug_hi -hcsuf debug_hc -osuf debug_o -optc-DDEBUG   -c Linker.c -o Linker.debug_o
cc1: warnings being treated as errors
Linker.c: In function 'relocateSection':

Linker.c:4252:0:  warning: comparison between signed and unsigned

All warnings being fixed by patches to the respective files.

Thanks to Ben Lippmeier and Ian Lynagh for their generous help.

Best regards Thorkil

Trac metadata
Trac field Value
Version 6.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information