Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure cc and bindgen use the same size for enums #23

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

Sympatron
Copy link
Contributor

@Sympatron Sympatron commented Oct 30, 2024

On my machine (Windows) cc (using arm-none-eabi-gcc) and bindgen (using libclang) did not agree on whether enums should be i32 or not. This resulted in very broken code. This PR makes sure enums are always the same size for cc and bindgen.

Alternatively we could use -fno-short-enums, but I would prefer -fshort-enums because it will result in slightly less memory usage.

Copy link
Member

@sidcha sidcha left a comment

Choose a reason for hiding this comment

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

I faced a similar problem in b5e852e but I was using MSVC for everything.

@sidcha sidcha merged commit 6ffd7bc into goToMain:master Oct 31, 2024
2 checks passed
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.

2 participants