[GHC] #8676: RTS headers don't compile as C++

GHC ghc-devs at haskell.org
Fri Jan 17 16:51:08 UTC 2014


#8676: RTS headers don't compile as C++
----------------------------------+----------------------------------------
       Reporter:  blitzcode       |             Owner:  simonmar
           Type:  bug             |            Status:  new
       Priority:  normal          |         Milestone:  7.8.1
      Component:  Runtime System  |           Version:  7.6.3
       Keywords:                  |  Operating System:  Unknown/Multiple
   Architecture:                  |   Type of failure:  Building GHC failed
  Unknown/Multiple                |         Test Case:
     Difficulty:  Unknown         |          Blocking:
     Blocked By:                  |
Related Tickets:                  |
----------------------------------+----------------------------------------
 GHC's RTS headers can't be included from C++, as they contain constructs
 like this

 {{{
 dbl_link_replace(bdescr *new, bdescr *old, bdescr **list)
 }}}

 (notice the 'new'). This is the case for the headers shipped with 7.6.3
 and still seems to be in the HEAD version.

 Since the code has the usual

 {{{
 #ifdef __cplusplus
 extern "C" {
 #endif
 }}}

 all over the place, I assume the C++ incompatibility is simply an
 oversight? In any case, it would seem highly unusual to have a C interface
 that can't be consumed from C++. It seems all the incompatibilities could
 be removed with at worst a small amount of inconvenience, and automatic
 checking for C++ compatibility on each build could be added.

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


More information about the ghc-tickets mailing list