Skip to content

Conversation

@randomPoison
Copy link
Contributor

This PR builds on #438 to fix cases where the rewriter was generating invalid code when assigning 0 to a function pointer or when comparing a function pointer against 0. This fixes #412.

@ayrtonm This doesn't fully address #411 (which you were trying to do in the original PR), but I'm having a harder time getting that working. Does it make sense to you to land this portion of the changes on its own?

@randomPoison randomPoison requested a review from ayrtonm January 27, 2025 19:47
@randomPoison
Copy link
Contributor Author

Woops, tests were failing because I didn't realize I needed ninja check in order to fully run the test suite. I've updated the tests to reflect the changed rewriter logic, mainly changing { NULL } into { 0 }, since it seems reasonable to normalize the output to 0 instead of trying to figure out which null macro to use in the output. Let me know if any of that doesn't look right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assignments to function pointer fields get rewritten incorrectly

3 participants