i have enabled three std checks
--addon=misra --std=c11 --std=c++11
Specially below two are detected false if I compare cppcheck with the LDRA output .
“misra-c2012-R.12.2” (--addon=misra)
“shiftTooManyBits” (--std=c11 --std=c++11).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
my code:
{
typedef unsigned uint32_t;
uint32_t shift ;
shift = shift >> 8u;
}
cppcheck output :
shiftTooManyBits
Shifting 4-bit value by 8 bits is undefined behaviour
i have enabled three std checks
--addon=misra --std=c11 --std=c++11
Specially below two are detected false if I compare cppcheck with the LDRA output .
“misra-c2012-R.12.2” (--addon=misra)
“shiftTooManyBits” (--std=c11 --std=c++11).
I fail to reproduce