[Haskell-cafe] Compiling with hsc2hs and -Wextra

Niklas Hambüchen mail at nh2.me
Thu Nov 8 01:54:33 CET 2012


when I compile my C binding using hsc2hs with the -Wextra enabled in my
cabal file:

    cc-options: -std=c99 -Wall -Wextra -Werror

This breaks the compilation started by hsc2hs:

    MyHsc.hsc: In function ‘main’:
    MyHsc.hsc:16:15: error: unused parameter ‘argc’
    MyHsc.hsc:16:27: error: unused parameter ‘argv’
    cc1: all warnings being treated as errors
    compiling dist/build/MyHsc_hsc_make.c failed (exit code 1)

I would really like to compile my code with -Wextra -Werror though.

Can't we just (void) argc; (void) argv; the arguments in the generated
code, like described in [1]?



More information about the Haskell-Cafe mailing list