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

Proposal: treat typedef types as separate type specifier #733

Open
ehaas opened this issue Jul 31, 2024 · 0 comments
Open

Proposal: treat typedef types as separate type specifier #733

ehaas opened this issue Jul 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ehaas
Copy link
Collaborator

ehaas commented Jul 31, 2024

Briefly discussed here #433 (comment)

This would add a new field .typedef to Type.Specifier with an associated data *Typedef, with Typedef defined as:

const Typedef = struct {
   name: StringId,
   ty: Type,
};

This could potentially help solve #437 and #367. Furthermore this will be necessary for translate-c support, since we currently do not maintain type name information. For example, if uint32_t immediately resolves to unsigned int, we can't translate that as u32 instead of c_uint. The same applies to typedef'd enums and records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant