We have a build process that may or may not generate some headers files, so we have this basic code:
#ifdef AFILE #include AFILE #endif
This always results in an error:
Checking test.c ... test.c:2:0: error: No header in #include [preprocessorErrorDirective] #include AFILE ^
Adding <define name="AFILE" value="any-value"> hasn't helped, since I cannot find an "any-value" that suppresses this issue.</define>
And fwiw, this code does not display the error:
#ifdef AFILE #include BFILE #endif
Any ideas? I'd be happy enough to just find a way to suppress this particular issue through cfg.
Not very good. You can for instance use -UAFILE as a workaround. I have created https://trac.cppcheck.net/ticket/10734
-UAFILE
Log in to post a comment.
We have a build process that may or may not generate some headers files, so we have this basic code:
This always results in an error:
Adding <define name="AFILE" value="any-value"> hasn't helped, since I cannot find an "any-value" that suppresses this issue.</define>
And fwiw, this code does not display the error:
Any ideas? I'd be happy enough to just find a way to suppress this particular issue through cfg.
Not very good. You can for instance use
-UAFILE
as a workaround.I have created https://trac.cppcheck.net/ticket/10734