2021-01-21 10:31 AM
2021-01-21 10:39 AM
option to force UNSIGNED CHAR
2021-01-21 11:01 AM
depends on the compiler you are using
2021-01-21 11:13 AM
Thanks for your reply!
I using STM32CubeIDE for stm32F446, in the properties settings I see toolchain set to GNU tools for STM32
2021-01-21 11:20 AM
-funsigned-char
2021-01-21 11:31 AM
:) BIG THANKS
Where should be added?
I trying in Properties->C/C++ Build->Settings->Tool Settings->MCU GCC Compiter->Miscellaneous->Other flags
but not works
2021-01-21 11:33 AM
can you give a source code line example what didn't work and what is the compiler message
2021-01-21 11:44 AM
void CCT_CrcIns(char pos,char bb) { cct_crc_buffer[pos] = bb; }
this is one of the lines that generates the warning: array subscript has type 'char' [-Wchar-subscripts]
if I change char to unsigned char then the code not generates the warning
I used IAR for arm and all chars were unigned as default.
Project is very big and wuold be better for me to put unsigned char as default.
I worte -funsigned-char in the miscellaneus but seems not ok
Thanks lot your help
2021-01-21 11:57 AM
I debugging with some char trials and seems to work. Still have the warnings, I will fix any line in program.
:) Thanks
2021-01-21 12:03 PM
That's another warning. char remains a separate type and so that warning remains regardless of signed/unsigned.