www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/28/20:39:59

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199604290017.AA082707040@relay1.geis.com>
Date: Mon, 29 Apr 96 00:20:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: sizeof(int) == 4?!

Reply to message 3437345    from STWAND07 AT UCTV on 04/28/96  3:58PM


>The use of long has no effect in DJGPP since int's are "long" (32 bit)
>by default.

Actually, printf() and similar commands will moan and groan if you send
them longs with %d specifiers, or ints with %ld.  I guess this is for
compatibility, as no compiler I've seen has required the use of %h
for shorts.

Speaking of longs vs. ints, I had a great deal of fun with v1.2, which defined
size_t as an int rather than a long, which is standard.  Then, when v2 came
out and turned size_t back to a long, I had to go and change all those
print specifiers back.  Or was it size_t?  I can't even remember now, but it
was one of the defined _t types.  :)

John

- Raw text -


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