Date: Mon, 4 Sep 1995 11:04:41 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: bde@zeta.org.au (Bruce Evans) Cc: mal@algonet.se, terry@lambert.org, committers@FreeBSD.org, current@FreeBSD.org, mark@grondar.za Subject: Re: eBones Changes coming soon! Message-ID: <199509041804.LAA21773@phaeton.artisoft.com> In-Reply-To: <199509040805.SAA14279@godzilla.zeta.org.au> from "Bruce Evans" at Sep 4, 95 06:05:11 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> >The extern declarations have (and should have) __P(( int a, char *b)) > >wrappers on them so that an ANSI compiler can do type checking that > >would be in the linker if anyone could build a linker with any brains > >(besides Fred Fish's M88k one, I mean). > > An ANSI compiler must also do type conversions of the args if a > prototype is in scope, and it can use a parameter passing convention > better suited to the arg types. It can do this if there is a prototype in scope; the declaration itself doesn't need it. Yeah, this means you need to be careful to include the prototype containing header in the file declaring the function, but this is hardly a hardship. > >The only valid argument for prototypes in the function declarations > >themselves is so you can compile the kernel with C++, which is not > > The following arguments are sometimes given: > > 1) For static functions, it the prototype need not be declared separately > from the function if the function is defined before it is referenced. > 2) It is possible to pass chars and shorts without promotion. > > These are actually counter-arguments :-). 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509041804.LAA21773>