At 14:04 31-1-2010 -0800, kavaler wrote: > >Something that would be useful in the MSP430X version of gcc would be to have >the compiler generate a warning (or error) when a user attempts to reference >a far function or data, without a cast. This would apply if the -mdata-64k >is specified. The compiler now just generates bad code, assuming the far >pointer is 16 bits. A warning or error would at least allow the user to >clean up their code and find these bad references.
IMHO this should be the other way around. The GCC compiler for the Renesas H8 has similar issues with some code or data being far or near (this is also an architecture which started as 16 bit but has been extended to 24bit adresses). The GCC H8 compiler always emits code with 24 bit addresses. The optimisation stage finally optimises for 16 or 24 bit addresses. Nico Coesel
