Polyspace error in string.h file for IAR Compiler
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mithun Bharadwaj
el 21 de Mayo de 2015
Respondida: Alexandre De Barros
el 24 de Jun. de 2015
When we run the polyspace tool on the project, the tool throws an error in string.h file for the lines below.
__EFF_NENW1NW2 __ATTRIBUTES int memcmp(const void *, const void *, size_t);
#define __EFF_NENW1NW2 _Pragma("function_effects = no_state, no_errno, no_write(1,2)") in ycheck.h file
The error is shown below. Error: expected a declaration
Generic Question: Does Polyspace recognize _Pragma, #pragma and such preprocessor functions and directives? Kindly provide some solution for this issue.
0 comentarios
Respuestas (1)
Alexandre De Barros
el 24 de Jun. de 2015
Hello Mithun!
I've been able to verify your code using the 'iar' dialect in my Polyspace project. Actually I created a project by using the IAR template which selects the 'iar' dialect automatically. Did you use this template too? Or do you have the same error with the 'iar' dialect ? Please note that I'm using 15a.
About the _Pragma, they are ignored by Polyspace and do not cause a compilation error (again, I've tested this _Pragma with R2015a).
Regards,
Alex
0 comentarios
Ver también
Categorías
Más información sobre Generate Report en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!