For example, STDC is automatically defined by the gcc. Will the cppcheck add such configs automatically?
How to handle such configs if need the configs to be defined for the checking. Do we need to add them in the command line options.
Many thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It doesn't work like that.
cppcheck works through both paths; if STDC is defined and if it is not.
If cppcheck says there is no problem, your program will work whether the compiler has set STDC or not.
*Since this could expand exponentially, by default only a limited number of configurations are tried. Use --force or --max-configs= to expand this limit.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
For example, STDC is automatically defined by the gcc. Will the cppcheck add such configs automatically?
How to handle such configs if need the configs to be defined for the checking. Do we need to add them in the command line options.
Many thanks!
It doesn't work like that.
cppcheck works through both paths; if STDC is defined and if it is not.
If cppcheck says there is no problem, your program will work whether the compiler has set STDC or not.
*Since this could expand exponentially, by default only a limited number of configurations are tried. Use --force or --max-configs= to expand this limit.
Ok, got it, thanks!
This ticket is related: https://trac.cppcheck.net/ticket/8956