[Bug 1175667] New: "./Setup configure --ghc-option=-optc-Wall" gives "warning: control reaches end of non-void function [-Wreturn-type]"

bugzilla at redhat.com bugzilla at redhat.com
Thu Dec 18 10:19:58 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1175667

            Bug ID: 1175667
           Summary: "./Setup configure --ghc-option=-optc-Wall" gives
                    "warning: control reaches end of non-void function
                    [-Wreturn-type]"
           Product: Fedora
           Version: rawhide
         Component: ghc-rpm-macros
          Assignee: petersen at redhat.com
          Reporter: petersen at redhat.com
        QA Contact: extras-qa at fedoraproject.org
                CC: haskell-devel at lists.fedoraproject.org,
                    petersen at redhat.com



Description of problem:
After adding CFLAGS to %cabal_configure build.log's now include

+ ./Setup configure --prefix=/usr --libdir=/usr/lib64
--docdir=/usr/share/doc/cabal-rpm '--libsubdir=$compiler/$pkgid'
'--datasubdir=$pkgid' --ghc --enable-executable-dynamic '--ghc-options=
-optc-O2 -optc-g -optc-pipe -optc-Wall -optc-Werror=format-security
-optc-Wp,-D_FORTIFY_SOURCE=2 -optc-fexceptions -optc-fstack-protector-strong
-optc--param=ssp-buffer-size=4 -optc-grecord-gcc-switches -optc-m64
-optc-mtune=generic  -optl-Wl,-z,relro'
Configuring cabal-rpm-0.9.2...
/tmp/18846.c: In function 'foo':
/tmp/18846.c:1:1:
     warning: control reaches end of non-void function [-Wreturn-type]
     int foo() {}
     ^

This caused by -Wall and something in Cabal I guess.
Grepping the Cabal source only shows up:

./Distribution/Simple/GHC.hs:362:               hPutStrLn testchnd "int foo() {
return 0; }"

Version-Release number of selected component (if applicable):
ghc-rpm-macros-1.2.17-1.fc21
ghc-rpm-macros-1.3.9-1.fc22

Steps to Reproduce:
1. build Fedora Haskell package Cabal-based package 

Actual results:
:
warning: control reaches end of non-void function [-Wreturn-type]
:

Expected results:
no warning

Additional info:
Should probably report this upstream.

It can be reproduced by:

./Setup configure --ghc-option=-optc-Wall

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=kPg2PA8x2x&a=cc_unsubscribe


More information about the haskell-devel mailing list