www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/08/14:13:14

Date: Sat, 8 Oct 1994 09:48:07 -0700 (PDT)
From: "Frederick W. Reimer" <fwreimer AT crl DOT com>
Subject: Re: djgpp and the 386SX
To: Helmut Muelner <hmuelner AT iicm DOT tu-graz DOT ac DOT at>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

On Sat, 8 Oct 1994, Helmut Muelner wrote:

> >>>>> "FR" == Frederick W Reimer <fwreimer AT crl DOT com> writes:
> 
> 
> FR> As far as Unix programs and such are concerned, what's wrong with 
> FR> assuming that the size of an int is the same as the size of a pointer?  
> FR> This is almost a given in the C programming world, or at least is should 
> FR> be.  
> 
> 
>  NO NO NO NO NO
> 
> You should try to port some software to DEC-ALPHA workstations, where
> integers are 32 bits and pointers are 64 bits.  Lots of programmers
> assume that you need not declare strlen, because the compiler assumes
> the unspecified argument to be an int which has (on most systems) the
> same size as a pointer.

O.K., got me on that one.  I guess I was getting carried away.  What I was
getting at is that you SHOULD be able to assume that a compiler that is
said to be a 32-bit compiler uses at least 32-bit int's and pointers, and
16-bit compilers use 16-bit ints and pointers.  These types, pointers 
and ints, need not be the same length.  Is this making sense?  Am I getting 
through? 

I guess it's because I got "tricked" into buying MS and BI compilers that 
were said to be 32-bit compilers, but don't use 32-bit operations on 
integer types.  Thank God for DJGPP!

Fred Reimer

+-------------------------------------------------------------+
| The views expressed in the above are solely my own, and are |
| not necessarily the views of my employer.  Have a nice day! |
| PGP2.6 public key available via `finger fwreimer AT crl DOT com`   |
+-------------------------------------------------------------+



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019