Tool/software: TI C/C++ Compiler
Hello,
we observe peculiar behavior with a code construct like this:
char arr[256]; [...] uint32_t status32 = 0x01020304; char out = *(arr + (uint8_t)(status32 >> 16)); // out of bounds access char out = *(arr + (0xffu & (status32 >> 16))); // yields arr[2] as expected
Out of bounds access is inferred from the result being 0xff (arr does not contain 0xff).
This may be a compiler bug. Compiler is TI v15.12.5 TLS