Path: utzoo!mnetor!uunet!nuchat!uhnix1!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Are the criteria for Unix and PC compilers different? Message-ID: <1584@sugar.UUCP> Date: 18 Mar 88 13:08:16 GMT References: <22314ad9@ralf.home> <17398@watmath.waterloo.edu> Organization: Sugar Land UNIX - Houston, TX Lines: 27 Summary: No. In article ... backstro@silver.bacs.indiana.edu (Dave White) writes: >When will they >realize that some of us really want the option of using 32-bit ints to >port Unix-born code? * UNIX does not imply 32 BITS. My first porting nightmare was getting a PDP-11 UNIX program with 16 bit ints to run on a VAX under UNIX with 32 bit ints. Most everything went together well, but there were places where the following assumptions were made: -1 == 0xFFFF 32767<<1 < 0 sizeof(int) == 2 sizeof(char *) == 2 * 32 bit machine does not imply sizeof(int) == 4. There are compilers for 32-bit machines for which sizeof(int) = 2. This is a bit more effcient on the 68000, for example. * sizeof(int) == 4 does not imply sizeof(int) == sizeof(char *). In fact on the prime sizeof(char *) does not even equal sizeof(float *). -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.