From 0bcf9e28fc6b41f75e78557295decfdcdb947b7a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 2 Mar 2017 10:58:26 +0900 Subject: Reorganize C++ exceptions; ref #3470 There are 3 levels of C++ exception handling: * default - no C++ exception (use setjmp/longjmp) * enable_cxx_exception (use C++ exceptions with C ABI) * enable_cxx_abi (use C++ ABI including exceptions) --- include/mruby/throw.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mruby/throw.h b/include/mruby/throw.h index 010793027..5d3d214e7 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -7,8 +7,10 @@ #ifndef MRB_THROW_H #define MRB_THROW_H -#if defined(MRB_ENABLE_CXX_EXCEPTION) && !defined(__cplusplus) -#error Trying to use C++ exception handling in C code +#if defined(MRB_ENABLE_CXX_ABI) +# if !defined(__cplusplus) +# error Trying to use C++ exception handling in C code +# endif #endif #if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus) -- cgit v1.2.3