I found, that is impossible to cast the type of pointer when I want to increment it.
When I try something like this:
((unsigned int *)voidptr)++;
I got the error: 'lvalue' required for '++' operation.
If I omit the parenthesis, no increment is done because no type casting is done (because the priority of operands) and the size of void is 0.
If I try to add the sizeof of unsigned int:
nothing happens, because in the sdcc the size of void is 0.
I think that this is not right. In this case is impossible to modify an void pointer. The gcc thinks that size of void is 1, so voidptr+=sizeof(something) makes sense.
I thing, that sizeof anything may not be 0. sizeof(void), increment void* etc may produce an error or something, but does not silently ignore it. My opinion is that the right way is make it 1, like makes gcc.