Hello
I did create a project for MCF52233 with the wizard. I activated optimization level 4 and checked the generated disassembly file.
I got following code generated:
; 23: pch = strpbrk (str, key);; 24: while (pch != NULL);0x00000022 0x43F900000000 lea _key,a10x00000028 0x41F900000000 lea _str,a00x0000002E 0x4EBA0000 jsr _strpbrk0x00000032 0x2D48FFF0 move.l a0,-16(a6)
So return value is read from A0 (as expected by the calling convention) and strpbrk is putting return value in A0 as well.
Which library file are you linking with your application?
How did you create your project?
Did you define a pragma pointers_in_xx somewhere in your application (where xx stands either for A0 or for D0)?
This pragmas changes the way the compiler returns pointer values. See FAQ-27837 on www.freescale.com for more information on this pragma.
CrasyCat