[GHC] #14613: Validate Failure On OSX -- implicit fall through error for machO linker support (master == ghc8.5)

GHC ghc-devs at haskell.org
Sun Dec 24 23:03:16 UTC 2017


#14613: Validate Failure On OSX -- implicit fall through error for machO linker
support  (master == ghc8.5)
-------------------------------------+-------------------------------------
           Reporter:  carter         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.3
  (Linking)                          |
           Keywords:                 |  Operating System:  MacOS X
       Architecture:  x86_64         |   Type of failure:  None/Unknown
  (amd64)                            |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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: {


 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14613>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list