bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t


From: Bruno Haible
Subject: Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t
Date: Mon, 9 Jan 2006 14:07:33 +0100
User-agent: KMail/1.5

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]