Hi,
Wenbing Ma schrieb:
> int main()
> {
> unsigned int a1,b1;
>
> b1=0x1234;
> a1=*(unsigned int*)(b1);
>
> return 0;
> }
> Use 'sdcc main.c' to compile. SDCC reports "error 127: non-pointer type
> cast to generic pointer from type 'unsigned-int' to type 'unsigned-int
> generic *' ". Is
Hello,
You're compiling for mcs51 (default) and this has a
harvard architecture. So the compiler needs to know what
memory type the pointer should point to
(code/data/xdata?). C was created with a VonNeumann
architecture in mind.
Maarten
> Hi,
>
> Code in main.c :
>
> int main()
> {
> unsi
Hi,
Code in main.c :
int main()
{
unsigned int a1,b1;
b1=0x1234;
a1=*(unsigned int*)(b1);
return 0;
}
Use 'sdcc main.c' to compile. SDCC reports "error 127: non-pointer type
cast to generic pointer from type 'unsigned-int' to type 'unsigned-int
generic *' ". Is it a limitatio