Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 无符号指针的非法隐式转换_C_Eclipse_Pointers_Codewarrior - Fatal编程技术网

C 无符号指针的非法隐式转换

C 无符号指针的非法隐式转换,c,eclipse,pointers,codewarrior,C,Eclipse,Pointers,Codewarrior,为什么要编译: char * tst1=0; short * tst2=0; tst1=tst2; tst2=tst1; 但这并不是: unsigned char * tst1=0; unsigned short * tst2=0; tst1=tst2; tst2=tst1; 这只是一个显示我得到的编译错误的示例。我正在将一个项目从一个旧的IDE移植到一个新的基于eclipse的IDE,这用于编译,但不是在eclipse IDE上 基本上,有一堆用于编译的隐式转换,但现在是非法的。我想知道这

为什么要编译:

char * tst1=0;
short * tst2=0;
tst1=tst2;
tst2=tst1;
但这并不是:

unsigned char * tst1=0;
unsigned short * tst2=0;
tst1=tst2;
tst2=tst1;
这只是一个显示我得到的编译错误的示例。我正在将一个项目从一个旧的IDE移植到一个新的基于eclipse的IDE,这用于编译,但不是在eclipse IDE上


基本上,有一堆用于编译的隐式转换,但现在是非法的。我想知道这样做的原因,以及eclipse上可能的解决方法,以使其再次成为一个警告

原因可能是从eclipse传递给C编译器的参数不同。尝试在以前的IDEs配置中查找它们,或者从其输出窗口中查找它们。如果您当前的IDE基于Eclipse,那么您应该能够毫无问题地更新编译器设置(因为它在Eclipse上是可配置的,不让更改这样的设置是愚蠢的…。

ok我在查看旧IDE中的项目设置时发现了问题。我错过了一个宏:#pragma mpwc_relaxy on