www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/07/12:49:41

Date: Fri, 7 Jun 1996 12:45:27 -0400
From: dj (DJ Delorie)
Message-Id: <199606071645.MAA04889@delorie.com>
To: j DOT aldrich6 AT genie DOT com
CC: djgpp AT delorie DOT com
In-reply-to: <199606070618.AA121348280@relay1.geis.com> (j.aldrich6@genie.com)
Subject: Re: Why doesnt this work!

> >The second problem was that of using printf in this manner.  The compiler has
> >no way of knowing that the first parameter to the variable argument list is
> >_supposed to be_ a float (it has the %f format specifier), when in actuality
> >it is of integral type.  This is a Bad Thing.
> 
> Actually, the compiler is quite smart about the *printf and *scanf functions -
> it examines the format string and compares it to the type of each argument
> to make sure you are doing things correctly.  Make sure that you compile
> with -Wall to get all such warnings.

It won't use this information to change the way it passes parameters.
It only uses them for generating warnings.  You must still fix your
code.

- Raw text -


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