Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Cc: Dan Morrill <morrildl@nycap.rr.com>
Subject: Re: Function parameter weirdness
Date: Thu, 28 Oct 1999 16:38:57 -0700	[thread overview]
Message-ID: <19991028163857.C27836@twiddle.net> (raw)
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~


  reply	other threads:[~1999-10-28 23:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-24  3:03 Function parameter weirdness Dan Morrill
1999-10-24 15:03 ` Uncle George
1999-10-24 20:18   ` Dan Morrill
1999-10-25 10:19     ` Uncle George
1999-10-28 23:38       ` Richard Henderson [this message]
1999-10-29 10:28         ` Uncle George
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox