summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-06-04 13:50:53 +0900
committerNobuyoshi Nakada <[email protected]>2025-06-04 15:31:40 +0900
commit9fddb8d954d35b70dd39676af563e66125646f39 (patch)
tree737361e29af983da5fc38414d28acb3a38e03d6f
parent7ddc5e6187fdf531fe5e92f01bb4624c06bddda2 (diff)
Suppress dangling pointer warning by gcc
`__has_warning` is clang, not gcc.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13509
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 0e5de6af71..6928eafe58 100644
--- a/thread.c
+++ b/thread.c
@@ -4742,7 +4742,7 @@ rb_gc_set_stack_end(VALUE **stack_end_p)
{
VALUE stack_end;
COMPILER_WARNING_PUSH
-#if __has_warning("-Wdangling-pointer")
+#ifdef __GNUC__
COMPILER_WARNING_IGNORED(-Wdangling-pointer);
#endif
*stack_end_p = &stack_end;