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

Failing to resolve GVAR macro #39

Open
kymckay opened this issue Aug 30, 2022 · 1 comment
Open

Failing to resolve GVAR macro #39

kymckay opened this issue Aug 30, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@kymckay
Copy link
Owner

kymckay commented Aug 30, 2022

#define ADDON TEST
#define DOUBLES(var1, var2) var1##_##var2
#define GVAR(var1) DOUBLES(ADDON, var1)

GVAR(var)

This should resolve to TEST_var and is currently resolving to TEST_ var which is then considered as 2 tokens and causes a syntax error. Presumably a bug in the way I handle preprocessing concatenation.

@kymckay kymckay added the bug Something isn't working label Aug 30, 2022
@kymckay kymckay added this to the 1.0.0 milestone Aug 30, 2022
@kymckay
Copy link
Owner Author

kymckay commented Aug 30, 2022

The incompatible behaviour occurring is that the space character in the macro argument is preserved instead of ignored. I need to check whether spaces should always be trimmed from arguments, or if it only applies to concatenation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant