summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authordearblue <[email protected]>2018-12-23 17:22:59 +0900
committerdearblue <[email protected]>2018-12-23 17:22:59 +0900
commit49cce74c1ac6b2cedc909eaefa5cbd1d44c906da (patch)
tree63a71f18ace90adfb763bfa8145fd40f81dae429 /include
parentf6c07b883550b4e78e0922eec08458307d623b8c (diff)
downloadmruby-49cce74c1ac6b2cedc909eaefa5cbd1d44c906da.tar.gz
mruby-49cce74c1ac6b2cedc909eaefa5cbd1d44c906da.zip
Suppress __STDC_VERSION__ warns for C++
Diffstat (limited to 'include')
-rw-r--r--include/mruby.h2
-rw-r--r--include/mruby/common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 171f47126..8c8360784 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -57,7 +57,7 @@
#define mrb_assert_int_fit(t1,n,t2,max) ((void)0)
#endif
-#if __STDC_VERSION__ >= 201112L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
#define mrb_static_assert(exp, str) _Static_assert(exp, str)
#else
#define mrb_static_assert(exp, str) mrb_assert(exp)
diff --git a/include/mruby/common.h b/include/mruby/common.h
index 4c7d9384a..4eaac9af7 100644
--- a/include/mruby/common.h
+++ b/include/mruby/common.h
@@ -34,7 +34,7 @@
MRB_BEGIN_DECL
/** Declare a function that never returns. */
-#if __STDC_VERSION__ >= 201112L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
# define mrb_noreturn _Noreturn
#elif defined __GNUC__ && !defined __STRICT_ANSI__
# define mrb_noreturn __attribute__((noreturn))