Subject: Re: IPF in our source tree
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/03/2007 09:49:38
--WhfpMioaduB5tiZL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Jun 02, 2007 at 12:42:54AM -0400, der Mouse wrote:
> >> [...K&R definitions vs prototype definitions...]
> > The big problem with K&R style is it assumes everything fits in an
> > int.
>=20
> Not really; you can pass around large types in K&R style. What you
> don't get is the implicit cast from the actual argument's type to the
> formal parameter's type. Provided you're careful that the actual
Uhm, that's why I said "assume" as opposed to "must" or some other word.=20
:-)
> argument's type (after the default promotions) is compatible with the
> formal parameter's type (ditto), you're fine - whether or not it fits
> in an int.
>=20
> Coders used to the implicit casts provided by prototype declarations
> are likely to find the necessary discipline difficult. :-/
My understanding is that, back in the day, coders used to the "necessary
discipline" found it difficult. Which is why we have prototypes. :-)
Take care,
Bill
--WhfpMioaduB5tiZL
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
iD8DBQFGYvEiWz+3JHUci9cRAmgMAJ0dYWGipkCOxLWcHxnhaSagx4sidACgh9ik
wTjaf8B6yieP0ZeRgYFs520=
=J1FJ
-----END PGP SIGNATURE-----
--WhfpMioaduB5tiZL--