strangest systems I've sent email from

Maciej W. Rozycki macro at linux-mips.org
Sun May 22 16:18:25 CDT 2016


On Sun, 22 May 2016, Mouse wrote:

> >>>>       size_t foo = (size_t)-1;
> >>>        size_t foo = -(size_t)1;
> >>     size_t foo = (size_t)(-1);
> >  Why bother?  Won't:
> > 	size_t foo = ~0UL;
> > do (~0ULL for C99)?
> 
> Only if size_t is no larger than unsigned long int (unsigned long long
> int for the ULL version).  I don't think that's guaranteed.

 How can you have the type of `size_t' wider than the widest unsigned 
integer type in the respective revision of the language standard?

  Maciej


More information about the cctalk mailing list