Mark D. Baushke wrote on 2005-11-15:
> it would be more portable to use this:
> 
>     #ifndef SIZE_MAX
>     # define SIZE_MAX ((size_t)-1)
>     #endif
> 
> because ((size_t)-1) will work even if size_t is narrower than int.

Yes. As explained on 2005-07-11, I prefer to write this as
  ((size_t)~(size_t)0)
because this way we don't need to refer to ISO C 99 6.3.1.3.(2).

Bruno



_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to