From 94eab59667820f46222ee21dc21ada988fa2beab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 7 Apr 2023 12:15:43 +0300 Subject: Don't use volatile to mean atomic volatile is not sufficient to provide atomic guarantees and real atomics should be used instead. GCC 11 has started warning about using volatile with atomic operations. In case of orc, the volatile integers were always protected with a mutex, which makes it completely unnecessary. Part-of: --- tools/orcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/orcc.c b/tools/orcc.c index 3585e93..36b0adc 100644 --- a/tools/orcc.c +++ b/tools/orcc.c @@ -862,7 +862,7 @@ output_code_execute (OrcProgram *p, FILE *output, int is_inline) fprintf(output, " OrcProgram *p = _orc_program_%s;\n", p->name); } } else { - fprintf(output, " static volatile int p_inited = 0;\n"); + fprintf(output, " static int p_inited = 0;\n"); if (use_code) { fprintf(output, " static OrcCode *c = 0;\n"); } else { -- cgit v1.2.1