Subject: Re: __UNCONST(a)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 07/01/2004 17:39:07
[ On Thursday, July 1, 2004 at 04:58:22 (-0400), der Mouse wrote: ]
> Subject: Re: __UNCONST(a)
> > > #define __UNCONST(a) ((void *)(((const char *)(a) - (const char *)0) + (char *)0))
> > Although this will likely work on most (if not all) architechtures,
> > it's not really allowed by C. When subtracting pointers they both
> > have to point into the same array.
> Isn't it into the same _object_?
How can a NULL pointer ever point to the same storage object as any
other non-NULL pointer?
(never mind that conceptually a nil pointer doesn't point at any storage
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <email@example.com>
Planix, Inc. <firstname.lastname@example.org> Secrets of the Weird <email@example.com>