We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi to all, I have in use the EC++ Compiler from Tasking and want to change my whole EC++ project to KEIL. I tried to compile some files with the KEIL EC166 but I always get the following error: ------------------ argument of type "char *" is incompatible with parameter of type "signed char *" ------------------ I give you a short eyample: #include <string.h> int func1() { char sHlp[10]; return strlen(sHlp); } The error is shown at the bold line. Could it be that the KEIL EC166 has the default 'char' defined as 'unsigned char'? And if this is so, is there a possibility to change this with a commandline-option or #pragma? Thank you for your help! Franz
This looks like a bug in the compiler. There is a workaround:
#include <string.h> int func1() { signed char sHlp[10]; return strlen(sHlp); }
I'm sorry, my mistake. The bug is not in the compiler but in the header file string.h. In C++, the declaration should look like this
extern size_t strlen (char *);
extern size_t strlen (signed char *);
Hi Mike, Thank you! You are right - I just received a email from the technical support that this is a problem of the 'signed char' definitions in the headerfile in connection with the C166 and the run-time library. KEIL is working on this (I hope so)... best regards Franz