[Bug #19145] volatile on an argument may not be effective

This commit is contained in:
Nobuyoshi Nakada 2022-11-25 14:20:46 +09:00
parent 45bad8c7b8
commit 67d0f4821f
Notes: git 2022-11-25 06:50:24 +00:00

View File

@ -333,11 +333,12 @@ rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE opt, VA
}
static void
rb_ec_error_print_detailed(rb_execution_context_t *volatile ec, volatile VALUE errinfo, VALUE str, volatile VALUE emesg)
rb_ec_error_print_detailed(rb_execution_context_t *const ec, const VALUE errinfo, const VALUE str, VALUE emesg0)
{
volatile uint8_t raised_flag = ec->raised_flag;
volatile VALUE errat = Qundef;
volatile bool written = false;
volatile VALUE emesg = emesg0;
VALUE opt = rb_hash_new();
VALUE highlight = rb_stderr_tty_p() ? Qtrue : Qfalse;