summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 01:50:49 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 01:50:49 (GMT)
commitd8db69e68301594360db3a4bc923b263c9909ff7 (patch)
tree7a5ca4b5199a177b9b57cad5283637ae217c74d9 /eval_intern.h
parentd0b92e798feb650cbb912d3b4bc4546a1caac6ad (diff)
Suppress false warnings
* vm_eval.c (rb_eval_cmd): refactor to share common code, and suppress false maybe-uninitialized warnings by old gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 8da66c9..bb4b93b 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -139,9 +139,11 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8)
# define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var))
# define VAR_INITIALIZED(var) ((var) = VAR_FROM_MEMORY(var))
+# define VAR_NOCLOBBERED(var) volatile var
#else
# define VAR_FROM_MEMORY(var) (var)
# define VAR_INITIALIZED(var) ((void)&(var))
+# define VAR_NOCLOBBERED(var) var
#endif
/* clear th->state, and return the value */