Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 459
    • Merge requests 459
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #14784
Closed
Open
Created Feb 09, 2018 by niteria@trac-niteria

RTS header files can't be used with a C++ compiler

If you compile m1.cpp:

#include "Rts.h"
int main(int argc, char** argv) {
}

with:

g++ -g m1.cpp -std=c++11 -I includes/ -c

you get:

In file included from includes/Rts.h:29:0,
                 from m1.cpp:1:
includes/Stg.h:29:3: error: #error __STDC_VERSION__ does not advertise C99 or later
 # error __STDC_VERSION__ does not advertise C99 or later
   ^

It's not advertised anywhere that it should work, but it used to work. https://phabricator.haskell.org/D2045 is what introduced this check.

Judging by https://stackoverflow.com/questions/48045243/ghc-gcc-compiler-issue-stdc-version-w-c99-from-stg-h-fails-for-every-packa, it affects GHC 8.2 and later.

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC hvr, simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking