Re: pointer arithmetics and casts

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

 



On Fri, May 25, 2007 at 09:14:33PM -0400, Morten Welinder wrote:
> >        BINOP[+]
> >                <tree for p>
> >                BINOP[*]
> >                        IMPLICIEDT_CAST[ptrdiff_t]
> >                                <tree for i>
> >                        VAL[sizeof(*p)]
> 
> I don't think you want ptrdiff_t there.  It isn't guaranteed to
> be big enough.

Only if you are allowed to have an array object with elements too far
for their addresses to be subtracted...
 
> size_t should do, though.

size_t is an unsigned type, so by definition it won't do...
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux