home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16761 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.5 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!doc.ic.ac.uk!uknet!acorn!ixi!clive
  2. From: clive@x.co.uk (Clive Feather)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Idle Questions about ANSI C
  5. Message-ID: <1992Nov18.125232.22873@x.co.uk>
  6. Date: 18 Nov 92 12:52:32 GMT
  7. References: <1992Nov13.213708.5456@mccc.edu> <BxqBp1.5M6@netnews.jhuapl.edu> <1992Nov17.123803.6400@thunder.mcrcim.mcgill.edu>
  8. Organization: IXI Limited, Cambridge, UK
  9. Lines: 38
  10.  
  11. In article <1992Nov17.123803.6400@thunder.mcrcim.mcgill.edu> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  12. > Now: is it required that size_t be the same as one of the four usual
  13. > unsigned integral types?  (How about ptrdiff_t?)
  14.  
  15. Yes. The term "integral type" *has* [1] to be read as defined in 6.1.2.5.
  16. An integral type is:
  17.  
  18.     char
  19.     a "signed integer type"
  20.     an "unsigned integer type"
  21.     an enumerated type
  22.  
  23. a signed integer type is:
  24.  
  25.     signed char
  26.     short int
  27.     int
  28.     long int
  29.  
  30. an unsigned integer type is:
  31.  
  32.     unsigned char
  33.     unsigned short int
  34.     unsigned int
  35.     unsigned long int
  36.  
  37. size_t must be an unsigned integral type and ptrdiff_t a signed one. I
  38. don't think anything can be read into the use of "integer" in one place
  39. and "integral" in another.
  40.  
  41. [1] It says so at the start of section 3 (ISO).
  42.  
  43.  
  44. -- 
  45. Clive D.W. Feather     | IXI Limited         | If you lie to the compiler,
  46. clive@x.co.uk          | Vision Park         | it will get its revenge.
  47. Phone: +44 223 236 555 | Cambridge   CB4 4RZ |   - Henry Spencer
  48. Fax:   +44 223 236 550 | United Kingdom      |
  49.