Re: what is the suggested way to do void * arithmetic ?

From: Amar Takhar <verm_at_drunkmonk.net>
Date: Thu, 10 Jul 2003 12:06:18 -0700
On 2003-07-10 12:03 -0700, Tim Kientzle wrote:
> David Leimbach wrote:
> >I think C takes a more low-level approach and says "void * is just an
> >address
> >void * + 1 means the next valid address".
>
> This is not true.
>
> The ANSI C standard forbids arithmetic on void * pointers,
> just as C++ does.
>
> GNU gcc has supported void * arithmetic for a long
> time as an extension, but it's not standard behavior
> and you should not rely on it.


Yes, please don't it'll just make things harder for TenDRA in the future :)

<-goes back to his cave.


Amar.
Received on Thu Jul 10 2003 - 10:06:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:14 UTC