home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / gnu / gcc / help / 2272 < prev    next >
Encoding:
Text File  |  1992-10-07  |  2.9 KB  |  77 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!segfault.UUCP!rfg
  3. From: rfg@segfault.UUCP
  4. Subject: Re: Conflicts between GCC and GLIBC -- What to do
  5. Message-ID: <13498.718480615@segfault>
  6. Sender: daemon@cis.ohio-state.edu
  7. Reply-To: lupine!segfault!rfg@uunet.uu.net
  8. Organization: GNUs Not Usenet
  9. References: <9210062252.AA23217@churchy.gnu.ai.mit.edu>
  10. Distribution: gnu
  11. Date: Wed, 7 Oct 1992 16:56:55 GMT
  12. Lines: 63
  13.  
  14.  
  15. Roland McGrath writes:
  16.  
  17.      There is a potential problem with the `size_t' type and versions of
  18.   GCC prior to release 2.4.  ANSI C requires that `size_t' always be an
  19.   unsigned type.  For compatibility with existing systems' header files,
  20.   GCC defines `size_t' in `stddef.h' to be whatever type the system's
  21.   `sys/types.h' defines it to be.
  22.  
  23. That is all correct.
  24.  
  25.   Most Unix systems that define `size_t'
  26.   in `sys/types.h', define it to be a signed type.
  27.  
  28. I don't believe that this is completely accurate.  Looking at the files in
  29. the current development (pre-release) version of GCC 2.3, I see the following
  30. definitions:
  31.  
  32. a29k.h:#define SIZE_TYPE "unsigned int"
  33. convex.h:#define SIZE_TYPE "unsigned int"
  34. dec-osf1.h:#define SIZE_TYPE    "long unsigned int"
  35. decrose.h:#define SIZE_TYPE     "long unsigned int"
  36. decstatn.h:#define SIZE_TYPE "unsigned int"
  37. encrose.h:#define SIZE_TYPE     "long unsigned int"
  38. hp320.h:#define SIZE_TYPE "unsigned int"
  39. i386iscgas.h:#define SIZE_TYPE "unsigned int"
  40. i386linux.h:#define SIZE_TYPE "unsigned int"
  41. i386mach.h:#define SIZE_TYPE "long int"
  42. i386sco.h:#define SIZE_TYPE "unsigned int"
  43. i386sun.h:#define SIZE_TYPE "int"
  44. iris.h:#define SIZE_TYPE        "unsigned int"
  45. m88k.h:#define SIZE_TYPE "unsigned int"
  46. mot3300.h:#define SIZE_TYPE "unsigned int"
  47. news.h:#define SIZE_TYPE "long int"
  48. news3.h:#define SIZE_TYPE "long int"
  49. news3gas.h:#define SIZE_TYPE "long int"
  50. pa-ghpux.h:#define SIZE_TYPE "unsigned int"
  51. pa-hpux.h:#define SIZE_TYPE "unsigned int"
  52. pa.h:#define SIZE_TYPE "unsigned int"
  53. plexus.h:#define SIZE_TYPE int
  54. romp.h:#define SIZE_TYPE "long int"
  55. seq386.h:#define SIZE_TYPE "int"
  56. sequent.h:#define SIZE_TYPE "int"
  57. sparc.h:#define SIZE_TYPE "int"
  58. sun2o4.h:#define SIZE_TYPE "int"
  59. sun3.h:#define SIZE_TYPE "int"
  60. svr3.h:#define SIZE_TYPE "unsigned int"
  61. svr4.h:#define SIZE_TYPE "unsigned int"
  62. ultrix.h:#define SIZE_TYPE "unsigned int"
  63. vax-vms.h:#define SIZE_TYPE "unsigned int"
  64. we32k.h:#define SIZE_TYPE "unsigned int"
  65.  
  66. Now I admit that this is not a "scientific" survey of all UNIX systems,
  67. but it does make it appear that the majority of GCC target systems *are*
  68. already conforming to the ANSI C standard with respect to the signedness
  69. of size_t.  Only a few archaic systems do otherwise.
  70.  
  71.  
  72. // Ron ("Loose Cannon") Guilmette
  73. // uucp: ...uunet!lupine!segfault!rfg
  74. // New new motto:  Quality control is a state of mind.
  75. //   misc.forsale.computers ad, circa 2007:
  76. //       Used Cray wrist watch for sale; 25 bucks or best offer.
  77.