ank1099
ank1099

Reputation: 1

PRQA QAC terminates after encountering #error directive

I am new to QAC stuff and I am trying to set up QAC on my project. I am currently encountering this error when I try to run QAC on a file.

C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\arm\inc\c\intrinsics.h @@@ 26 @@@ 869 @@@ [Q] '#error' directive: "Unknown compiler intrinsics version" Analysis terminated due to '#error' directive. @@@ 9

I have set the compiler personality file to not include the warnings from the folder above, but I am still seeing this error. Please kindly help on how to overcome this issue.

Upvotes: 0

Views: 2536

Answers (1)

Johan
Johan

Reputation: 3881

In general it is not a good idea to apply static analysis to headers provided with the compiler as they are tuned to the compiler in question and can contain any number of specialized constructions. In fact they may not even compile with another compiler and this is completely OK.

As an answer to the problem at hand, it looks like your static analysis tool is missing some of the macros that are predefined in iccarm. One way to solve this problem is to use the --predef_macros command line parameter to have the compiler output a file containing all predefined macros (as C source code). The content of this file can be used to set up the static analysis environment.

Upvotes: 0

Related Questions