-Wconversion is broken for 'short' parameters.

Philipp Thomas pthomas@suse.de
Thu Jul 27 03:31:00 GMT 2000


* Veksler Michael (mveksler@techunix.technion.ac.il) [20000727 12:21]:

> (Ommitted 'gcc-bugs@gcc.gnu.org' from the mail):

And taken into agian from me :)
 
> It looks wrong: short (or char) are promoted to 'int' both in K&R code and
> in ISO C, so why do we need the warning?

No they're not! It's one of the differences between K&R and ISO, that
Arguments don't get default promotion in the presence of prototypes.

In ISO C, only arguments to vararg functions get default promotion (which,
BTW, is the reason why gcc will warn if you do ' va_arg(arg, char)').

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX for PDP 11, /usr/include/sys/param.h


More information about the Gcc-bugs mailing list