Remove `mrb_static_assert` from the core; #5051

parent 11cc7bed
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
#define mrb_static_assert(exp, str) _Static_assert(exp, str) #define mrb_static_assert(exp, str) _Static_assert(exp, str)
#else #else
#define mrb_static_assert(exp, str) mrb_assert(exp) #define mrb_static_assert(exp, str)
#endif #endif
#include "mrbconf.h" #include "mrbconf.h"
......
...@@ -1619,9 +1619,6 @@ mrb_init_gc(mrb_state *mrb) ...@@ -1619,9 +1619,6 @@ mrb_init_gc(mrb_state *mrb)
{ {
struct RClass *gc; struct RClass *gc;
mrb_static_assert(sizeof(RVALUE) <= sizeof(void*) * 6,
"RVALUE size must be within 6 words");
gc = mrb_define_module(mrb, "GC"); gc = mrb_define_module(mrb, "GC");
mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE()); mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE());
......
...@@ -2926,9 +2926,6 @@ mrb_init_string(mrb_state *mrb) ...@@ -2926,9 +2926,6 @@ mrb_init_string(mrb_state *mrb)
{ {
struct RClass *s; struct RClass *s;
mrb_static_assert(RSTRING_EMBED_LEN_MAX < (1 << MRB_STR_EMBED_LEN_BIT),
"pointer size too big for embedded string");
mrb->string_class = s = mrb_define_class(mrb, "String", mrb->object_class); /* 15.2.10 */ mrb->string_class = s = mrb_define_class(mrb, "String", mrb->object_class); /* 15.2.10 */
MRB_SET_INSTANCE_TT(s, MRB_TT_STRING); MRB_SET_INSTANCE_TT(s, MRB_TT_STRING);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment