Re: [Sdcc-user] sdcc compiler syntax

2009-02-16 Thread Frieder Ferlemann
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

Re: [Sdcc-user] sdcc compiler syntax

2009-02-16 Thread Maarten Brock
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

[Sdcc-user] sdcc compiler syntax

2009-02-16 Thread Wenbing Ma
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