www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/29/02:10:27

Xref: news2.mv.net comp.os.msdos.djgpp:3224
From: drake AT psu DOT edu (Ryan Drake)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sizeof(int) == 4?!
Date: 28 Apr 1996 16:44:07 GMT
Organization: Penn State University, Center for Academic Computing
Lines: 24
Message-ID: <4m078n$1skq@hearst.cac.psu.edu>
References: <4m03nd$nsc AT freenet-news DOT carleton DOT ca>
Reply-To: stiletto AT psu DOT edu
NNTP-Posting-Host: rtd114.rh.psu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 28 Apr 1996 15:43:41 GMT, Nicholas Lynch shared with us these insightful words:
: But in DJGPP:

:   Variable         Size
:   ---------------------
:   int              4
:   unsigned int     4
:   long             4
:   ...

:  Is there any way of correcting this? (I belive that this problem cropped up
: earlier in thee newsgroup, but I didn't save the solution :( Or, should I
: just use a different data type instead of int?

It is not a problem.  I believe all gcc compilers use the correct value for
sizeof(int).  It is more or less standard.  If you want a 2-byte integer, use
short int.

--
+-----------------------------------------------------------------------+
| Ryan Drake			Sanity is the trademark of a weak mind.	|
| stiletto AT psu DOT edu					-- Mark Harrold	|
| http://www.crayola.cse.psu.edu/~drake/home.html			|
+-----------------------------------------------------------------------+

- Raw text -


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