Skip to content

Validate Failure On OSX -- implicit fall through error for machO linker support (master == ghc8.5)

seems like validate for OSX needs some TLC, heres a bug from the linker code that maybe could use an eyeball or two. Phyx suggests someone familiar with the code base could simply do __attribute__ ((fallthrough));, which is allegedly also supported by clang?

"inplace/bin/ghc-stage1" -optc-fno-stack-protector -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wundef -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DDTRACE -optc-Irts/dist/build/./autogen -optc-Wno-error=inline -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DDYNAMIC -optc-DRtsWay=\"rts_dyn\" -fPIC -dynamic  -O0 -H64m -Wall -fllvm-fill-undef-with-garbage    -Werror -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -this-unit-id rts -dcmm-lint  -DDTRACE     -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen            -O2 -Wcpp-undef    -Wnoncanonical-monad-instances  -c rts/posix/GetTime.c -o rts/dist/build/posix/GetTime.dyn_o
rts/linker/MachO.c: In function 'ocGetNames_MachO':

rts/linker/MachO.c:1532:17: error:
     error: this statement may fall through [-Werror=implicit-fallthrough=]
                     secArray[i].info->relocation_info
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     = (MachORelocationInfo*)(oc->image + section->reloff);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |
1532 |                 = (MachORelocationInfo*)(oc->image + section->reloff);
     |                 ^

rts/linker/MachO.c:1534:13: error:
     note: here
                 default: {
                 ^~~~~~~
     |
1534 |             default: {

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