I was trying to return a pointer from a function and was getting some strange results.
char *LookUpPtr(int selector)
{
char *addr;
addr = /* some math */
return addr;
}
I turned Optimizations Off and it started to work. Anyone know how to fix this?
I was able to pass the pointer via:
void LookUpPtr(int selector, char **ptr)
{
char *addr;
addr = /* some math */
*ptr = addr;
}
I’m using CodeWarrior Development Studio for ColdFire Architectures Version 6.3 (Preview Release) and targeting the MCF52233 Coldfire.
Thanks,
Curt