This has been reported in the Cppcheck forum:
https://sourceforge.net/p/cppcheck/discussion/general/thread/f20832cc83/
If simplecpp is called with -include=<file>, and the file does not exist, there is no error message. simplecpp just ignores the file. This could be very confusing for users since the real issue thus can be hidden for a long time.
At simplecpp:2426 a not existing file is simply ignored.
GCC aborts with a fatal error in the same case.
To not break the compatibility, simplecpp could be changed to print some warning so the user knows that the file is not included but otherwise behave as before.
I suggest the same handling for include files that exist but can not be opened for some reason.
This has been reported in the Cppcheck forum:
https://sourceforge.net/p/cppcheck/discussion/general/thread/f20832cc83/
If
simplecppis called with-include=<file>, and the file does not exist, there is no error message.simplecppjust ignores the file. This could be very confusing for users since the real issue thus can be hidden for a long time.At simplecpp:2426 a not existing file is simply ignored.
GCC aborts with a fatal error in the same case.
To not break the compatibility,
simplecppcould be changed to print some warning so the user knows that the file is not included but otherwise behave as before.I suggest the same handling for include files that exist but can not be opened for some reason.