In Project properties -> Build -> ARM Compiler -> Advanced options -> Runtime Model options:
It's important to keep in mind that in C, the three types "char", "unsigned char", and "signed char" are all distinct types, even though "char" has the same format as one of "unsigned char" or "signed char." You can freely assign between these types, because the language allows implicit conversion between arithmetic types. However, the language does not allow implicit conversion between pointers of different types.
I assume you intend to use the typedef BYTE to do byte-wise access of larger objects. In that case, you should define it as "unsigned char," because the standard guarantees you can do this with "unsigned char", but does not necessarily guarantee you can do it with "signed char" or "char."
Thank you for the prompt reply.
In my 25 years of C language programming, I have used many compilers and many development systems, and I know that almost all of them don't give warnings on pointers to different (but actually same) types.
This issue is very heavy when integrating various open-source modules from different developers. I would not be forced to replace all user-defined types in a module to avoid warnings on BYTE * to unsigned char * conversions.
A compiler switch to skip this warning would be appreciated.
Please let me know your considerations.
Thanks
Mario