[GHC] #10237: compiler/ghci/LibFFI.hsc:42 sizeof(ffi_cif) is not an integer

GHC ghc-devs at haskell.org
Fri Apr 3 08:31:26 UTC 2015


#10237: compiler/ghci/LibFFI.hsc:42 sizeof(ffi_cif) is not an integer
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Building GHC      |  Unknown/Multiple
  failed                             |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by erikd):

 Ok, here's the problem:

 {{{
 LibFFI.hsc: In function ‘_hsc2hs_test’:
 LibFFI.hsc:11:14: error: variable ‘test_array’ set but not used [-Werror
 =unused-but-set-variable]
 cc1: some warnings being treated as errors
 }}}

 It seems `hsc2hs` generates some test files to measure the size of values
 that looks like this:

 {{{
 void _hsc2hs_test() {
   static int test_array[1 - 2 * !((long long)(sizeof(ffi_cif)) ==
 (sizeof(ffi_cif)))];
   test_array[0] = 0;
 }
 }}}


 The value of `test_array[0]` is set but not used.

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


More information about the ghc-tickets mailing list