Suppress dangling pointer warning by gcc

`__has_warning` is clang, not gcc.
This commit is contained in:
Nobuyoshi Nakada 2025-06-04 13:50:53 +09:00
parent 7ddc5e6187
commit 9fddb8d954
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2025-06-04 07:38:10 +00:00

View File

@ -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;