www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/01/19:05:37

From: kagel AT quasar DOT bloomberg DOT com
Date: Wed, 1 May 1996 18:59:12 -0400
Message-Id: <9605012259.AA05035@quasar.bloomberg.com >
To: j DOT aldrich6 AT genie DOT com
Cc: djgpp AT delorie DOT com
In-Reply-To: <199604290017.AA082707040@relay1.geis.com> (j.aldrich6@genie.com)
Subject: Re: sizeof(int) == 4?!
Reply-To: kagel AT dg1 DOT bloomberg DOT com

   From: j DOT aldrich6 AT genie DOT com
   Date: Mon, 29 Apr 96 00:20:00 UTC 0000

   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.

Actually they all would complain except that with a variable argument list
function like printf, etc, shorts are upgraded to ints before calling the
function so it does not matter!

   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.  :)

-- 
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com

A proverb is no proverb to you 'till life has illustrated it.  -- John Keats

- Raw text -


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