mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Reduce scope of volatile keyword for MSC bug
This commit is contained in:
@@ -215,15 +215,18 @@ mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
|
||||
{
|
||||
mrb_int i;
|
||||
mrb_value max;
|
||||
mrb_value r = mrb_nil_value();
|
||||
rand_state *random;
|
||||
|
||||
/*
|
||||
* MSC compiler generating invalid instructions with optimization
|
||||
* MSC compiler bug generating invalid instructions with optimization
|
||||
* enabled
|
||||
*/
|
||||
#if defined _MSC_VER && _MSC_VER >= 1923
|
||||
volatile
|
||||
volatile mrb_value rr;
|
||||
rr = r;
|
||||
r = rr;
|
||||
#endif
|
||||
mrb_value r = mrb_nil_value();
|
||||
rand_state *random;
|
||||
|
||||
if (RARRAY_LEN(ary) > 1) {
|
||||
mrb_get_args(mrb, "|o", &r);
|
||||
|
||||
Reference in New Issue
Block a user