Skip to content

Fix incompatible function pointer type error with Xcode 26.5 beta#9453

Merged
hsbt merged 1 commit into
masterfrom
fix-xcode-26-5-beta
Apr 2, 2026
Merged

Fix incompatible function pointer type error with Xcode 26.5 beta#9453
hsbt merged 1 commit into
masterfrom
fix-xcode-26-5-beta

Conversation

@hsbt

@hsbt hsbt commented Apr 2, 2026

Copy link
Copy Markdown
Member

What was the end-user or developer problem that led to this PR?

Xcode 26.5 beta ships a clang that promotes -Wincompatible-function-pointer-types to an error by default. The test's inline C extension defined VALUE foo() (taking no arguments) but passed it to rb_define_global_function which expects VALUE (*)(VALUE) through Ruby's RBIMPL_ANYARGS dispatch macro.

What is your fix for the problem, implemented in this PR?

Adding the VALUE self parameter fixes the signature mismatch.

Make sure the following tasks are checked

Xcode 26.5 beta ships a clang that promotes -Wincompatible-function-pointer-types to an error by default. The test's inline C extension defined `VALUE foo()` (taking no arguments) but passed it to `rb_define_global_function` which expects `VALUE (*)(VALUE)` through Ruby's RBIMPL_ANYARGS dispatch macro. Adding the `VALUE self` parameter fixes the signature mismatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 2, 2026 02:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates an inline C extension used in Bundler’s git-source install specs to compile cleanly with Xcode 26.5 beta’s clang, which now errors on incompatible function-pointer types.

Changes:

  • Fix the C function signature for a global Ruby function defined via rb_define_global_function by adding the required VALUE self parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsbt hsbt merged commit d6116b7 into master Apr 2, 2026
101 checks passed
@hsbt hsbt deleted the fix-xcode-26-5-beta branch April 2, 2026 02:43
hsbt added a commit that referenced this pull request Apr 7, 2026
Fix incompatible function pointer type error with Xcode 26.5 beta

(cherry picked from commit d6116b7)
hsbt added a commit that referenced this pull request Apr 7, 2026
Fix incompatible function pointer type error with Xcode 26.5 beta

(cherry picked from commit d6116b7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants