From owner-freebsd-hackers Tue Nov 7 19: 5:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.gbch.net (gw.gbch.net [203.24.22.66]) by hub.freebsd.org (Postfix) with SMTP id D0E7737B479 for ; Tue, 7 Nov 2000 19:05:27 -0800 (PST) Received: (qmail 64784 invoked by uid 1001); 8 Nov 2000 13:05:19 +1000 X-Posted-By: GBA-Post 2.06 15-Sep-2000 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Message-Id: Date: Wed, 08 Nov 2000 13:05:19 +1000 From: Greg Black To: "Albert D. Cahalan" Cc: hackers@FreeBSD.ORG, roam@orbitel.bg, keramida@ceid.upatras.gr Subject: Re: umask(2) and -Wconversion References: <200011080223.eA82Nxf392522@saturn.cs.uml.edu> In-reply-to: <200011080223.eA82Nxf392522@saturn.cs.uml.edu> of Tue, 07 Nov 2000 21:23:59 EST Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message