From 92f33ef216357e06b122131a3b347e8c63a31156 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 8 Jan 2016 10:52:24 +0000 Subject: [PATCH] iseq.c: volatile only on gcc4.8 * iseq.c (rb_iseq_compile_with_option): no volatile on gcc other than 4.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iseq.c b/iseq.c index 02c3cf16f0..f72478adfd 100644 --- a/iseq.c +++ b/iseq.c @@ -606,10 +606,10 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li const rb_iseq_t *const parent = base_block ? base_block->iseq : NULL; rb_compile_option_t option; const enum iseq_type type = parent ? ISEQ_TYPE_EVAL : ISEQ_TYPE_TOP; -#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8 +#if !defined(__GNUC__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 8) # define INITIALIZED volatile /* suppress warnings by gcc 4.8 */ #else -# define INITIALIZED volatile +# define INITIALIZED /* volatile */ #endif /* safe results first */ const INITIALIZED int ln = (make_compile_option(&option, opt), NUM2INT(line));