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

Token-pasting support for number##identifier #1

Closed
dwilliamson opened this issue Mar 10, 2017 · 2 comments
Closed

Token-pasting support for number##identifier #1

dwilliamson opened this issue Mar 10, 2017 · 2 comments

Comments

@dwilliamson
Copy link

This code:

#define K_DOUBLE(x) x##l
K_DOUBLE(0.5)

currently emits:

0.5�l

In an IDE the intermediate token is usually invisible leading to a very confusing compile error. However, it's just the TOK_SEP character being inserted where a concat operation hasn't been detected.

I've "fixed" the issue here: Celtoys@b6f4e10

That may not be the best way of going about this so would appreciate your feedback.

Thanks!

@bagder
Copy link
Owner

bagder commented Mar 15, 2017

Thanks! Please submit it as a pull request here so that we can review it easier. There's also that typo that's already been commented on which seems to imply that you didn't build and test exactly that version of the patch?

@dwilliamson
Copy link
Author

It was a copy/paste typo from another branch. I've just done a block copy to eliminate such issues.

Sorry, I can't submit a PR as I use fcpp on multiple projects in its single file form.

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

2 participants