Skip to content

simplecpp silently ignores when an explicitly included file does not exist #183

@versat

Description

@versat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions