Skip to content
  • Herbert Valerio Riedel's avatar
    Suppress conflicting types for builtins warnings · 192dd068
    Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
    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
    192dd068