J
juanitofoo
Hello,
I've just switched to gcc 4 and I came across a bunch of warnings that
I can't fix. Example:
#include <stdio.h>
int main()
{
signed char *p = "Hola";
return 0;
}
If I compile that file, I get:
kk.c: In function 'main':
kk.c:5: warning: pointer targets in initialization differ in signedness
Only if I remove the signed from the declaration it compiles without
errors. How can I use the signed or unsigned char?
I'm using gcc 4.0.1. The reason for asking this is because in one
program I'm always using int8_t and u_int8_t values, and both of them
are signed or unsigned, no simply 'char' variables.
Thanks in advance.
I've just switched to gcc 4 and I came across a bunch of warnings that
I can't fix. Example:
#include <stdio.h>
int main()
{
signed char *p = "Hola";
return 0;
}
If I compile that file, I get:
kk.c: In function 'main':
kk.c:5: warning: pointer targets in initialization differ in signedness
Only if I remove the signed from the declaration it compiles without
errors. How can I use the signed or unsigned char?
I'm using gcc 4.0.1. The reason for asking this is because in one
program I'm always using int8_t and u_int8_t values, and both of them
are signed or unsigned, no simply 'char' variables.
Thanks in advance.