summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-10-28 12:24:06 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-28 13:40:13 -0400
commit134de45117bdbb031f513734b84403443e083fbe (patch)
tree732148a7a250003d8dd50839ab6958b001862014 /includes
parent3c452d0dce33cb06ef739f4e44549a499277e11b (diff)
downloadhaskell-134de45117bdbb031f513734b84403443e083fbe.tar.gz
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
Diffstat (limited to 'includes')
-rw-r--r--includes/Stg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Stg.h b/includes/Stg.h
index 19069d8c1a..3a11af1e5e 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
/*