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()
> {
> 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 limitation or a bug?
>
> Thanks
> wbma
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user