[GHC] #14784: RTS header files can't be used with a C++ compiler
GHC
ghc-devs at haskell.org
Fri Feb 9 12:51:29 UTC 2018
#14784: RTS header files can't be used with a C++ compiler
-------------------------------------+-------------------------------------
Reporter: niteria | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime | Version:
System |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14784>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list