From: Kevin V. <ke...@vi...> - 2001-01-02 00:21:52
|
On 01-Jan-2001 Scott Dattalo wrote: > void incptr(unsigned char *ucP) > { > *ucP++; > } This code does nothing; SDCC is correct to generate an empty function (this code first dereferences ucP (and does nothing with the result), then increments the pointer (since the pointer value is never used again, this is also a no-op)). This does what I think you want, and appears to generate correct code: void foo(char *cp) { (*cp)++; } Peace, Kevin |