summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-06-08 23:04:22 +0900
committertake_cheeze <[email protected]>2014-06-08 23:16:51 +0900
commit4a27dd0e8a6ca46a2b1f6d84b003605327ddb843 (patch)
tree87aa357409719001632bf4a308e481ccb38bf0d0 /src
parente070fce835601ef9ff8d6fac8f7b16ff1a12cc54 (diff)
downloadmruby-4a27dd0e8a6ca46a2b1f6d84b003605327ddb843.tar.gz
mruby-4a27dd0e8a6ca46a2b1f6d84b003605327ddb843.zip
Use `_Static_assert` when C11 is available and use it in pointer size check.
Diffstat (limited to 'src')
-rw-r--r--src/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index ac9f88088..dc5a1481f 100644
--- a/src/state.c
+++ b/src/state.c
@@ -29,7 +29,7 @@ mrb_open_allocf(mrb_allocf f, void *ud)
mrb_state *mrb;
#ifdef MRB_NAN_BOXING
- mrb_assert(sizeof(void*) == 4);
+ mrb_static_assert(sizeof(void*) == 4, "when using NaN boxing sizeof pointer must be 4 byte");
#endif
mrb = (mrb_state *)(f)(NULL, NULL, sizeof(mrb_state), ud);