summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/keywords
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-12-02 21:35:21 +0900
committerGitHub <[email protected]>2020-12-02 21:35:21 +0900
commit42f33fd51a9f0e819d208c7b37dbbc62a7db3267 (patch)
treefdf8c573143bd33fdd09d5ebabc2753905b81d2b /mrbgems/mruby-compiler/core/keywords
parent661081a072e9176f2640664453f734e8aa993766 (diff)
parent00df8096091fea561f49297d47397571a39ccf88 (diff)
downloadmruby-42f33fd51a9f0e819d208c7b37dbbc62a7db3267.tar.gz
mruby-42f33fd51a9f0e819d208c7b37dbbc62a7db3267.zip
Merge pull request #5208 from shuujii/fix-build-for-C++11-when-enable_cxx_exception
Fix build for C++ version >= C++11 when `enable_cxx_exception`; close #5199
Diffstat (limited to 'mrbgems/mruby-compiler/core/keywords')
-rw-r--r--mrbgems/mruby-compiler/core/keywords5
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/keywords b/mrbgems/mruby-compiler/core/keywords
index a60ecd10a..a5961b6b8 100644
--- a/mrbgems/mruby-compiler/core/keywords
+++ b/mrbgems/mruby-compiler/core/keywords
@@ -1,4 +1,9 @@
%{
+/* Workaround for `enable_cxx_exception` (#5199) */
+#if defined __cplusplus && __cplusplus >= 201103L
+# define register
+#endif
+
struct kwtable {const char *name; int id[2]; enum mrb_lex_state_enum state;};
%}