Skip to content

transpile: Support enums with bool underlying type - #2011

Merged
ahomescu merged 2 commits into
immunant:masterfrom
Rua:enum-underlying
Sep 15, 2026
Merged

ahomescu merged 2 commits into
immunant:masterfrom
Rua:enum-underlying

Conversation

@Rua

@Rua Rua commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

bool is in fact a valid underlying type for C enums, but c2rust would just produce constants with 0 and 1. A lot of variables and fields were also named "integral type" which didn't help the matter. I've renamed everything to now say "underlying" type, which is the terminology used by the C23 standard.

@ahomescu
ahomescu merged commit 5b4da6a into immunant:master Sep 15, 2026
11 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