Matthew Woehlke <[EMAIL PROTECTED]> wrote, on 30 Mar 2007: > > Geoff Clare wrote: > >The code was just to illustrate the point that if it is possible for > >the condition (var > SSIZE_MAX) to be true then the implementation > >does not conform to the requirement that SSIZE_MAX is the maximum > >value of an object of type ssize_t. > > I still don't buy that. If that was the intended meaning then I would > expect the standard to read "...maximum value of a ssize_t" or "maximum > value of *type* ssize_t". It doesn't. It uses the word "object" in this > one, and ONLY one, instance. If this was *not* done to create a > distinction between representable and permissible values, then why *was* > it done?
The wording difference is accidental. The 1990 standard did not describe CHAR_MAX, INT_MAX, etc. at all, it just listed them as limits from the C Standard that were required by POSIX.1. Thus SSIZE_MAX was the only limit of that kind that had a description in POSIX.1-1990. There are variations in the wording for the other limits as well. E.g. CHAR_MAX is "Maximum value of type char", but INT_MAX is "Maximum value of an int". There is no significance to any of these variations. Interestingly the wording for SSIZE_MAX in 1990 was slightly different: "The maximum value that can be stored in an object of type ssize_t". The current wording seems to have come from XPG4. Since XPG4 deferred to POSIX.1-1990, there would have been no intended difference in requirements. -- Geoff Clare <[EMAIL PROTECTED]> The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England