-
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
token pasting ## fails with nested concatenation macros #225
Comments
This doesn't appear to be valid input. Where is it from? The formal arguments to
The result of See ANSI C89 6.8.3.3 or C99 6.10.3.3 et seq. |
The macros are defined here: https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/cpp.h They're used to insert the "#pragma comment" to automatically pull in the correct library (based on compiler version and options) here: https://github.com/wxWidgets/wxWidgets/blob/master/include/msvc/wx/setup.h |
Boost does the same thing here: https://github.com/boostorg/config/blob/develop/include/boost/config/auto_link.hpp |
Thanks. The original
Your test case abbreviates this:
and that's the source of the problem. The indirection through Put the helper back in and
|
Interesting. My test case was an attempt to simplify the wxWidgets case that was failing for me, and I simplified it too much. |
in godbolt i get
could simplecpp's error message be modified to maybe |
@mgood7123 yes certainly that would be much better. |
Hi all, I have a similar issue. Below is the test code to reproduce it. cppcheck_test.c:
simplecpp returns the following error:
According to comment #225 (comment) I would expect GCC preprocessor returns what I expect:
Which preprocessor follows the standard? |
Obviously GCC/G++/Clang/Clang++ ALL follow the standards SimpleCPP does not yet follow the standards and certainly CANNOT replace the cpp executable invoked during compilation to pre-process the input |
Specifically, it's preprocessor is not on par with cpp's preprocessor |
This seems to be a regression from 8d5df36. |
…pparently got broken by danmar@8d5df36
…ation. This fixes danmar#31 as reproduced in TEST_CASE(define_define_11) without breaking code from @ydamigos's comment to danmar#225 as reproduced in TEST_CASE(define_define_11a).
Continued from issue #159
Error message:
testsuite\token_concat.cpp:2: syntax error: failed to expand 'wxSETUPH_PATH', Invalid ## usage when expanding 'wxCONCAT'.
Code to reproduce:
The text was updated successfully, but these errors were encountered: