You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong token pasting/concatenation when token contains spaces #124
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.
Activity
qt.cfg: Add macro Q_DECLARE_PRIVATE (disabled for now)
Fix token pasting in macro when argument contains spaces. Fixes cppch…
danmar commentedon Aug 3, 2019
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.
versat commentedon Aug 3, 2019
I have not found a way to get gcc printing the tokens.
But clang has an option to output tokens:
clang seems to see two tokens.
danmar commentedon Aug 4, 2019
Nice! ok I agree we need to output 2 separate tokens. Well.. I still have the feeling we merge them by intention.
danmar commentedon Aug 4, 2019
I did not see any hashhash test that required merging. Only a hash test. So maybe it won't break anything to fix this.
orbitcowboy commentedon Mar 18, 2024
This has been tested with ad9b49d and prints now the expected result:
@danmar Do you have a test case in place already?
firewave commentedon Jul 3, 2025
test.cpp: added test for cppcheck-opensource#124 [skip ci]
test.cpp: added test for cppcheck-opensource#124
test.cpp: added tests for cppcheck-opensource#40
test.cpp: added test for cppcheck-opensource#124