From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 3341 invoked from network); 28 Oct 1999 23:38:59 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 28 Oct 1999 23:38:59 -0000 Received: from piglet.twiddle.net (root@piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA01995 for ; Thu, 28 Oct 1999 19:38:58 -0400 Received: (from rth@localhost) by piglet.twiddle.net (8.9.3/8.9.3) id QAA28062; Thu, 28 Oct 1999 16:38:57 -0700 Date: Thu, 28 Oct 1999 16:38:57 -0700 From: Richard Henderson To: axp-list@redhat.com Cc: Dan Morrill Subject: Re: Function parameter weirdness Message-ID: <19991028163857.C27836@twiddle.net> References: <38142EA1.E15C284@voicenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <38142EA1.E15C284@voicenet.com>; from Uncle George on Mon, Oct 25, 1999 at 06:19:13AM -0400 On Mon, Oct 25, 1999 at 06:19:13AM -0400, Uncle George wrote: > yup, but it sppears that the 'sender' of the parameter has to know what > type it is to get this picture correct. Kindof. The caller is supposed to sign-extend all 32-bit integers. Note that this is without respect to whether the variable is declared as `unsigned int' in the source. Values smaller than `int' are promoted by K&R rules to `int', so eg `unsigned short' winds up zero extended since bit 31 is never set. r~