| |||||
Technical Support Support Resources
Product Information | ARMCC: PLAIN CHAR VS. SIGNED CHARInformation in this article applies to:
QUESTIONI am using in my software typedef's to allow easy migration between different platforms. However the typedef for the INT8 datatype causes warning messages when I am passing it to standard C functions that take a char* parameter. I am getting the message:
warning: #167-D: argument of type "INT8 *" is incompatible
with parameter of type "char *"
The data type INT8 is defined as: typedef signed char INT8; What are the reasons for this warning messages? Can I disable the warning messages? ANSWERThere is a difference between a plain char and a signed char. By default a plain char represents an unsigned char value. Using the compiler directive --signed_chars changes the default behaviour of plain char to be a signed char. In µVision this is configured under Project - Options - C/C++ - Plain Char is Signed. Since your typedef is not 100% compatible, you are getting these warning messages. You have the following options to solve the problem:
Last Reviewed: Thursday, August 17, 2006 | ||||
| |||||