summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-06 03:19:17 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-06 03:19:17 (GMT)
commit3af095f84c8ea19165bfd9154829c867691039e6 (patch)
tree280b0ccd838bc2427578f8c96fe0806a69e9b0ec /eval_intern.h
parent0e34638f792ef908e59590266ed9edac5ce411f1 (diff)
eval_intern.h: prevent core dump with clang and make test-all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 7259a79..c496d13 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -144,7 +144,11 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
-#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8)
+#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || __clang__
+/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings.
+ * This macro also prevents Clang from dumping core in EC_EXEC_TAG().
+ * (I confirmed Clang 4.0.1 and 4.0.0.)
+ */
# 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