[commit: ghc] ghc-8.6: includes: Allow headers to be built with C++11 compilers (b539a99)
git at git.haskell.org
git at git.haskell.org
Sun Oct 28 18:41:20 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/b539a99cd0d53706092bcbab371bb3af74ba652d/ghc
>---------------------------------------------------------------
commit b539a99cd0d53706092bcbab371bb3af74ba652d
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Sun Oct 28 12:24:06 2018 -0400
includes: Allow headers to be built with C++11 compilers
Summary:
Fixes #14784. Note that C++11 is quite conservative; we could likely accept
C++03 as well.
Test Plan:
```
$ cat >hi.c <<EOF
#include <Rts.h>
EOF
$ g++ -std=c++11 hi.c
```
Reviewers: simonmar, hvr
Subscribers: rwbarton, carter
GHC Trac Issues: #14784
Differential Revision: https://phabricator.haskell.org/D5244
(cherry picked from commit d3a1022fabb0ad337003fac774c6929f402ecb8b)
>---------------------------------------------------------------
b539a99cd0d53706092bcbab371bb3af74ba652d
includes/Stg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/includes/Stg.h b/includes/Stg.h
index 2e02347..31b2c45 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -25,8 +25,8 @@
#pragma once
-#if !(__STDC_VERSION__ >= 199901L)
-# error __STDC_VERSION__ does not advertise C99 or later
+#if !(__STDC_VERSION__ >= 199901L) && !(__cplusplus >= 201103L)
+# error __STDC_VERSION__ does not advertise C99, C++11 or later
#endif
/*
More information about the ghc-commits
mailing list