[GHC] #7660: warning: conflicting types when compiling via-C

GHC ghc-devs at haskell.org
Sat Nov 21 16:15:34 UTC 2015


#7660: warning: conflicting types when compiling via-C
-------------------------------------+-------------------------------------
        Reporter:  singpolyma        |                Owner:  hvr
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.7
      Resolution:                    |             Keywords:  warning
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1506
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"192dd068890701a7692890677d4cbf9f2abdb64a/ghc"
 192dd068/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="192dd068890701a7692890677d4cbf9f2abdb64a"
 Suppress conflicting types for builtins warnings

 GCC 4.0 and later warn about type-conflicting prototypes for built-in
 functions such as `strlen`. This is a problem for the via-c backend as
 it generates code such as

   typedef void *(*(*StgFunPtr)(void))(void);
   extern StgFunPtr strlen();

 However, by using the `-fno-builtin` flag, GCC is told not to try to
 auto-detect such built-in functions and instead treat them as ordinary
 external functions.  This also suppresses this warning.

 This address #7660

 Test Plan: IIAM

 Reviewers: bgamari, austin

 Reviewed By: austin

 Subscribers: thomie, erikd

 Differential Revision: https://phabricator.haskell.org/D1506

 GHC Trac Issues: #7660
 }}}

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


More information about the ghc-tickets mailing list