Article View: comp.std.c
Article #4747Re: size_t
From: Larry Jones
Date: Fri, 02 Feb 1996 15:44
Date: Fri, 02 Feb 1996 15:44
24 lines
1548 bytes
1548 bytes
In article <4es27i$hd5@alterdial.UU.NET>, rex@aussie.com writes: > > larry.jones@sdrc.com (Larry Jones) writes: > > size_t must indeed be one of the standard types. > > Larry, I recall a discussion in committee re mapping pointers to some > integral type. Somewhere we require that I believe. IBM's AS400 came up as it > has (I think) 128-bit addresses but no integer type that big. I thought we > allowed magic integer types for some things but I may be misremembering. The requirement is in (ANSI) 3.3.4 Cast Operators: A pointer may be converted to an integral type. The size of integer required and the result are implementation-defined. If the space provided is not long enough, the behavior is undefined. My recollection of the discussion was that the committee agreed that the result need not be sensible (e.g., a conforming implementation could convert all pointers to 42) and that the implementation was free to document that *no* integral type is long enough. ---- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070 larry.jones@sdrc.com You should see me when I lose in real life! -- Calvin
Technical Details
Message-ID:
<4etbg8$sva@info1.sdrc.com>Path:
arc1-ca.pugleaf.net!sdrc.com!thor!scjonesReferences:
<4eo3sc$l14@info1.sdrc.com> <4es27i$hd5@alterdial.UU.NET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sdrc.com!thor!scjones From: larry.jones@sdrc.com (Larry Jones) Newsgroups: comp.std.c Subject: Re: size_t Date: 2 Feb 1996 15:44:08 GMT Organization: SDRC Engineering Services Distribution: world Message-ID: <4etbg8$sva@info1.sdrc.com> References: <4eo3sc$l14@info1.sdrc.com> <4es27i$hd5@alterdial.UU.NET> NNTP-Posting-Host: thor.sdrc.com Originator: scjones@thor