-
Notifications
You must be signed in to change notification settings - Fork 80
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
Wrong token pasting/concatenation when token contains spaces #124
Comments
Reference: https://wiki.qt.io/D-Pointer#Q_DECLARE_PRIVATE_and_Q_DECLARE_PUBLIC As long as trac ticket 8479 is not fixed i guess it is better to disable this macro. See also danmar/simplecpp#124
I have the feeling we merge "const Test suffix" into 1 token by intention. You did not say if gcc preprocessor outputs 1 single token or 2.. you only showed the text output. |
I have not found a way to get gcc printing the tokens.
clang seems to see two tokens. |
Nice! ok I agree we need to output 2 separate tokens. Well.. I still have the feeling we merge them by intention. |
I did not see any hashhash test that required merging. Only a hash test. So maybe it won't break anything to fix this. |
Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479.
For this C code:
gcc outputs:
simplecpp outputs:
The space between "const" and "Test" is removed.
Not sure what the standard says about such a case but since Qt and gcc are widely used i guess it should work like Qt expects it and gcc handles it to not break things.
The text was updated successfully, but these errors were encountered: