[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Re: xsize.h needs SIZE_MAX defined on Windows
From: |
Paul Eggert |
Subject: |
Re: [Bug-gnulib] Re: xsize.h needs SIZE_MAX defined on Windows |
Date: |
11 Mar 2004 11:58:31 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
"Mark D. Baushke" <address@hidden> writes:
> > But ~0 == 0 on hosts with ones'-complement arithmetic; and on such
> > hosts, (size_t) ~0 == 0.
> On such machines, I would expect that ((size_t) -1) is also a
> problematic assignment
No, because it's defined by the C Standard to be equal to SIZE_MAX.
Ones' complement hosts have to implement unsigned arithmetic the same
way that twos' complement hosts do. It's only signed arithmetic that
differs.
For more on this nowadays-arcan subject please see
<http://www.fourmilab.ch/documents/univac/minuszero.html>.