Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Nov 2000 13:05:19 +1000
From:      Greg Black <gjb@gbch.net>
To:        "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc:        hackers@FreeBSD.ORG, roam@orbitel.bg, keramida@ceid.upatras.gr
Subject:   Re: umask(2) and -Wconversion 
Message-ID:  <nospam-3a08c2ef720fce6@maxim.gbch.net>
In-Reply-To: <200011080223.eA82Nxf392522@saturn.cs.uml.edu>  of Tue, 07 Nov 2000 21:23:59 EST
References:  <200011080223.eA82Nxf392522@saturn.cs.uml.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
"Albert D. Cahalan" writes:

> The C language is crufty. In the absense of a prototype, "short" is
> promoted to "int". You wanted to be warned about that; you got it!
> 
> To avoid the warning, avoid passing anything but "int" and "double".
> Maybe "long" is OK too, I forget.

I'm not sure which C language you're talking about here, but
I'll assume it's C89.  In that language, in the absence of a
prototype, (and in K&R C), `int', `long', `double' and pointer
types are not promoted; but signed or unsigned `char', `short',
and `int' bit-fields are promoted; `float' is promoted.

-- 
Greg Black <gjb@acm.org>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?nospam-3a08c2ef720fce6>