Borrar filtros
Borrar filtros

Polyspace tricore target seems to use16-bit integers

1 visualización (últimos 30 días)
Hans Odeberg
Hans Odeberg el 28 de Jun. de 2018
Respondida: Aniket Rakshe el 28 de En. de 2019
I am checking for Misra deviations using Polyspace bug finder. My compiler settings are: -compiler tasking -target tricore
For this line:
unsigned int i = 1U << 20U;
I get the error :
MISRA C:2012 12.2 The right hand operand of a shift operator shall lie in the range zero to one less than the width of the essential type of the left hand operand.
This line, however, receives no error report:
unsigned long long j = (unsigned long long) 1U << 20U;
Conclusion: contrary to what the documentation states, Polyspace assumes that tricore is a 16-bit CPU - which it is not. Is there any way of telling Polyspace to use 32-bit integers?

Respuestas (1)

Aniket Rakshe
Aniket Rakshe el 28 de En. de 2019
Hello,
I want to add tasking compiler. Please help me out for this.
Thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by