This is my first post, I would like to start with a big Thank You! for all the work you are investing to provide this great tool.
We have just updated from cppcheck 2.13.0 to 2.15.0.
I have this code in my cpp file:
//#define XXX blah #ifdef XXX namespace XXX { #endif // do a lot of things #ifdef XXX } // namespace XXX #endif
Using cppcheck 2.13.0, everything is OK, using 2.15.0 a syntax error occurs:
$ cppcheck-2.15.0 src/demo.cpp Checking src/demo.cpp ... Checking src/demo.cpp: XXX... src/demo.cpp:4:11: error: syntax error [syntaxError] namespace XXX { ^
uncommenting the first line, the syntax error disappears.
Thanks again, Thorsten
WIthout this line //#define XXX blah cppcheck assumes XXX is defined as 1, so that define must be visible.
//#define XXX blah
XXX
1
Ouch! Of course you're right. I will check how I can change our code.
Sorry, and thanks for your support!
Log in to post a comment.
This is my first post, I would like to start with a big Thank You! for all the work you are investing to provide this great tool.
We have just updated from cppcheck 2.13.0 to 2.15.0.
I have this code in my cpp file:
Using cppcheck 2.13.0, everything is OK, using 2.15.0 a syntax error occurs:
uncommenting the first line, the syntax error disappears.
Thanks again,
Thorsten
WIthout this line
//#define XXX blah
cppcheck assumesXXX
is defined as1
, so that define must be visible.Last edit: CHR 2024-10-15
Ouch! Of course you're right. I will check how I can change our code.
Sorry, and thanks for your support!