@megafiddle:
Well, I started writing a response, but most of what I was writing seemed to be the same points made in 'C For Smarties', so I'll just post a link to that.
C For Smarties
Type: Posts; User: Barney McGrew
@megafiddle:
Well, I started writing a response, but most of what I was writing seemed to be the same points made in 'C For Smarties', so I'll just post a link to that.
C For Smarties
I see. This makes me wonder about code like:
int a[3][10];
a[0] < a[2];
Would you say it has undefined behaviour? On the one hand, both pointers point into separate aggregates, but on the other,...
'void *' and 'char *' are both able to represent all object pointer types. (6.2.5p28, 6.3.2.3p1)
Could it be that when two pointers are cast to 'void *', that the destination pointers are...
Are you sure it has undefined behaviour, rather than unspecified behaviour? If it were true I think that would make it impossible to implement memmove() in a standard-compliant manner.