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

C Type aliases should not emit a typedef, they should rewrite #872

Open
hellerve opened this issue Jun 13, 2020 · 2 comments
Open

C Type aliases should not emit a typedef, they should rewrite #872

hellerve opened this issue Jun 13, 2020 · 2 comments

Comments

@hellerve
Copy link
Member

Currently, when we do a type alias in register-type this emits a typedef, i.e.

; we already have a type for that, but its a great example
(register-type Bit8 "uint8_t")

This will emit:

typedef uint8_t Bit8;

This is problematic since it might clash with existing C names. We should rewrite all occurrences of that type to the corresponding C type, instead, as we do with functions registered with register.

Cheers

@hellerve
Copy link
Member Author

This is relatively beginner-to-intermediate-friendly, but not really a good first issue. It might take a while to figure out!

@eriksvedang
Copy link
Collaborator

Great point!

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

No branches or pull requests

2 participants