Re: [AD] warnings when using VC 7 (.net)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> void pointer arithmetic is undefined so using it for address calculation
> is painful.

Ok, fair enough.
I assume using a char* isn't really an option either?

> > Regardless, I *think* using ptrdiff_t instead of unsigned long *should*
> > fix the problem. (It must be large enough to hold the whole range of
> > pointer differences, which would be of the order of 2**64 on 64 bit
> > systems. IIRC, it is defined as (signed) long by DJGPP.)
> 
> Is it ISO C ?

As far as I know, yes, but I don't have the specs at hand and can't test 
with anything other than gcc. It doesn't complain even when using 
-pedantic.
It *should* be defined in stddef.h




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/