Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: Function prototypes (was: miscellaneous unrelated stuff) Message-ID: <8042@utzoo.UUCP> Date: Tue, 19-May-87 17:16:36 EDT Article-I.D.: utzoo.8042 Posted: Tue May 19 17:16:36 1987 Date-Received: Tue, 19-May-87 17:16:36 EDT References: <18346@ucbvax.BERKELEY.EDU> Organization: U of Toronto Zoology Lines: 16 > Henry Spencer claims that use of function prototypes is dangerous > because of what may happen if a function prototype is missing in one > environment, but present in another. Lightspeed C for the Macintosh > has an option that causes it to require function prototypes for all > external functions. Seems to me that use of this option would prevent > the type of disaster envisioned by Henry. Unfortunately, it's not as helpful as one would like: the dangerous problems are the ones where the prototype for xxx is being picked up from a header file, and you assume that the header file is the same in both environments, and it's not. If *both* environments have such a compiler option, fine; the point is that successful compilation with such an option in one environment tells you nothing about what's going to happen in another. -- "The average nutritional value Henry Spencer @ U of Toronto Zoology of promises is roughly zero." {allegra,ihnp4,decvax,pyramid}!utzoo!henry