Argument widening on varadic functions

Rich Salz rsalz at bbn.com
Wed Jan 11 04:15:49 AEST 1989


In <1329 at fig.bbn.com> (an article I just cancelled) I asked
 Does argument widening happen for <stdarg.h> functions?  Judging from the
 description of printf (i.e., "%f" prints a float argument), it seems
 that's the case.

And it is, in fact, the case.  Thanks to Leendert van Doorn <leendert at cs.vu.nl>
for the reference, paragraph 3.3.2.2:
 The ellipsis notation in a function prototype declarator causes
 argument type conversion to stop after the last declared parameter.
 The default argument promotions are performed on trailing arguments

Other speedy replies came from Doug Gwyn <gwyn at BRL.MIL>, Chris
Torek <chris at mimsy.umd.edu>, and Roland McGrath <mcgrath at homer.Berkeley.EDU>

Thanks!
	/rich $alz
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.



More information about the Comp.std.c mailing list