From 9a90cd228466ec088d6f0da8d1aa065f03daa7c8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 8 Oct 2024 15:41:28 +0900 Subject: Cast via `uintptr_t` function pointer between object pointer - ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type --- builtin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin.h') diff --git a/builtin.h b/builtin.h index 24aa7c2fdb..f23c0a7dad 100644 --- a/builtin.h +++ b/builtin.h @@ -15,7 +15,7 @@ struct rb_builtin_function { #define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity) {\ .name = _i < 0 ? NULL : #_name, \ - .func_ptr = (void *)_fname, \ + .func_ptr = (void *)(uintptr_t)_fname, \ .argc = _arity, \ .index = _i, \ } -- cgit v1.2.3