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

[Feature Request] Const of unit type generate "empty" defines #1017

Open
GrayJack opened this issue Oct 24, 2024 · 0 comments
Open

[Feature Request] Const of unit type generate "empty" defines #1017

GrayJack opened this issue Oct 24, 2024 · 0 comments

Comments

@GrayJack
Copy link
Contributor

In my project, depending on the target some definitions should expand to nothing instead of a number.

I would like that if a const defined as a unit type generated an empty define:
const MYCONST: () = () —> #define MYCONST

Currently I'm using a hack, since I do have a header that are included on all other headers, I create a manual #define None and make the const equal to None. That in turns generate #define [NAME] None, in the grand scheme of things, C preprocessor expand to nothing, as expected. But would be nice to have something easier and less hacky.

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

No branches or pull requests

1 participant