delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/08/21:56:09

Date: Wed, 8 May 1996 21:53:11 -0400
From: dj (DJ Delorie)
Message-Id: <199605090153.VAA15203@delorie.com>
To: lav AT video DOT yars DOT free DOT net
CC: justin AT yoss DOT canweb DOT net, wank AT uebemc DOT siemens DOT de, djgpp AT delorie DOT com
In-reply-to: <199605082039.AAA15807@video.yars.free.net> (lav@video.yars.free.net)
Subject: Re: vararg

> No, this is wrong. char is 1 byte in djgpp and it is automatically
> converted to int when passed as a parameter.

Not always.  If the function is prototyped as taking a char (not
"..."), it may get passed as an 8-bit value with undefined values in
the upper 24 bits of it's stack slot.

For printf it's true because of the "...".

- Raw text -


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