tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: why cast to char* through void*

On Wed, Jul 01, 2009 at 10:16:05PM -0400, Thor Lancelot Simon wrote:
 > > The compiler is allowed to assume that two pointers of different types
 > > point to things that don't overlap.
 > But there's an exception for pointers of type char *, isn't there?  At
 > least, I thought I remembered it was char *, but now I suspect it's
 > void *.

Er, yes, yes there is. I meant to put that in the original post,

char * and unsigned char *.

void * doesn't matter because you can't dereference it.

David A. Holland

Home | Main Index | Thread Index | Old Index