home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.help
- Path: sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!segfault.UUCP!rfg
- From: rfg@segfault.UUCP
- Subject: Re: Conflicts between GCC and GLIBC -- What to do
- Message-ID: <13498.718480615@segfault>
- Sender: daemon@cis.ohio-state.edu
- Reply-To: lupine!segfault!rfg@uunet.uu.net
- Organization: GNUs Not Usenet
- References: <9210062252.AA23217@churchy.gnu.ai.mit.edu>
- Distribution: gnu
- Date: Wed, 7 Oct 1992 16:56:55 GMT
- Lines: 63
-
-
- Roland McGrath writes:
-
- There is a potential problem with the `size_t' type and versions of
- GCC prior to release 2.4. ANSI C requires that `size_t' always be an
- unsigned type. For compatibility with existing systems' header files,
- GCC defines `size_t' in `stddef.h' to be whatever type the system's
- `sys/types.h' defines it to be.
-
- That is all correct.
-
- Most Unix systems that define `size_t'
- in `sys/types.h', define it to be a signed type.
-
- I don't believe that this is completely accurate. Looking at the files in
- the current development (pre-release) version of GCC 2.3, I see the following
- definitions:
-
- a29k.h:#define SIZE_TYPE "unsigned int"
- convex.h:#define SIZE_TYPE "unsigned int"
- dec-osf1.h:#define SIZE_TYPE "long unsigned int"
- decrose.h:#define SIZE_TYPE "long unsigned int"
- decstatn.h:#define SIZE_TYPE "unsigned int"
- encrose.h:#define SIZE_TYPE "long unsigned int"
- hp320.h:#define SIZE_TYPE "unsigned int"
- i386iscgas.h:#define SIZE_TYPE "unsigned int"
- i386linux.h:#define SIZE_TYPE "unsigned int"
- i386mach.h:#define SIZE_TYPE "long int"
- i386sco.h:#define SIZE_TYPE "unsigned int"
- i386sun.h:#define SIZE_TYPE "int"
- iris.h:#define SIZE_TYPE "unsigned int"
- m88k.h:#define SIZE_TYPE "unsigned int"
- mot3300.h:#define SIZE_TYPE "unsigned int"
- news.h:#define SIZE_TYPE "long int"
- news3.h:#define SIZE_TYPE "long int"
- news3gas.h:#define SIZE_TYPE "long int"
- pa-ghpux.h:#define SIZE_TYPE "unsigned int"
- pa-hpux.h:#define SIZE_TYPE "unsigned int"
- pa.h:#define SIZE_TYPE "unsigned int"
- plexus.h:#define SIZE_TYPE int
- romp.h:#define SIZE_TYPE "long int"
- seq386.h:#define SIZE_TYPE "int"
- sequent.h:#define SIZE_TYPE "int"
- sparc.h:#define SIZE_TYPE "int"
- sun2o4.h:#define SIZE_TYPE "int"
- sun3.h:#define SIZE_TYPE "int"
- svr3.h:#define SIZE_TYPE "unsigned int"
- svr4.h:#define SIZE_TYPE "unsigned int"
- ultrix.h:#define SIZE_TYPE "unsigned int"
- vax-vms.h:#define SIZE_TYPE "unsigned int"
- we32k.h:#define SIZE_TYPE "unsigned int"
-
- Now I admit that this is not a "scientific" survey of all UNIX systems,
- but it does make it appear that the majority of GCC target systems *are*
- already conforming to the ANSI C standard with respect to the signedness
- of size_t. Only a few archaic systems do otherwise.
-
-
- // Ron ("Loose Cannon") Guilmette
- // uucp: ...uunet!lupine!segfault!rfg
- // New new motto: Quality control is a state of mind.
- // misc.forsale.computers ad, circa 2007:
- // Used Cray wrist watch for sale; 25 bucks or best offer.
-