Hey,

with a code similar to that one:

int i = 2;
int j = 2;
void *a = &i;
void *b = &j;
unsigned long delta = a - b;

the compiler is displaying the warning "pointer to void or function used in
arithmetic". Why is it doing so whe computing an offset ? I know that adding
or substracting an offset to a void pointer is illegal, but when calculating
an offset, using typed or void pointers is exactly the same.

Vincent Torri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/tools-compilers/attachments/20090819/a30d2fd7/attachment.html>

Reply via email to