aboutsummaryrefslogtreecommitdiffstats
path: root/eval_error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-25 14:20:46 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-25 15:50:06 +0900
commit67d0f4821ff9ae550425a66202710d82de886384 (patch)
tree6287dd7c1faf71a533c3c36fa104b91cf4aaf3ac /eval_error.c
parent45bad8c7b8851a179515407d7ee2ed70545e4b40 (diff)
downloadruby-67d0f4821ff9ae550425a66202710d82de886384.tar.gz
[Bug #19145] `volatile` on an argument may not be effective
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval_error.c b/eval_error.c
index 0112dece0d..e02f54e8e6 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -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;