'Entity with internal linkage error' when using PolySpace Bug Finder
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 29 de Ag. de 2017
Respondida: MathWorks Support Team
el 29 de Ag. de 2017
In my code, I have a global inline function within which calls are made to a static inline function. The compiler I'm using (Tasking) doesn't have a problem here. However, during the analyses of the code using PolySpace Bug Finder, I receive the following error:
"an entity with internal linkage cannot be referenced within an inline function with external linkage"
Unfortunately I am not allowed to change the code, because it is code from external. How can I run the Bug Finder analyses without changing the code?
Respuesta aceptada
MathWorks Support Team
el 29 de Ag. de 2017
The error you observe is likely because PolySpace does not support the workflow of calling a Static inline function from within a global inline function. As a workaround, I would suggest using the "-post-preprocessing-command" to replace the 'static inline' to 'static' during preprocessing without modifying the original code. For more information on this, kindly refer to the following documentation link: <http://www.mathworks.com/help/bugfinder/ref/commandscripttoapplytopreprocessedfilespostpreprocessingcommand.html>
The above documentation link contains an example PERL script that is used to replace words in the preprocessing code. For your specific workflow, I would suggest using the following code inside the 'while' loop:
# Process every line from STDIN until EOF
while ($line = <STDIN>)
{
# Replace static inline with static
$line =~ s/^\s*static\s+inline/static/;
# Print the current processed line to STDOUT
print $line;
}
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Command-Line Only Options en Help Center y File Exchange.
Productos
Versión
Aún no se ha introducido una versión.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!