Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!seismo!rochester!kodak!grodberg From: grodberg@kodak.UUCP Newsgroups: comp.lang.c Subject: Re: Function prototypes (was: miscellaneous unrelated stuff) Message-ID: <839@kodak.UUCP> Date: Tue, 5-May-87 19:45:32 EDT Article-I.D.: kodak.839 Posted: Tue May 5 19:45:32 1987 Date-Received: Thu, 7-May-87 03:11:44 EDT References: <18346@ucbvax.BERKELEY.EDU> <7973@utzoo.UUCP> <796@rtech.UUCP> <1821@husc6.UUCP> <2023@bunker.UUCP> <731@sdchema.sdchem.UUCP> Reply-To: grodberg@kodak.UUCP (Jeremy Grodberg) Organization: Eastman Kodak Co, Rochester, NY Lines: 23 In article <731@sdchema.sdchem.UUCP> tps@sdchemf.UUCP (Tom Stockfisch) writes: >The way I handle (keeping function prototypes up to date without having make do complete recompiles) is to have my declaration/prototype header file contain >*only* declarations/prototypes, and then I DON'T MENTION IT IN THE MAKEFILE. >I can't think of a single case when this has caused a typing problem. The >way you mess up in this case is to change a function's type in its module >and forget to change it in the header file. Mentioning the header file in >the "Makefile" doesn't catch this error. There is an other way you mess up using Tom's method, which is a serious drawback: if you change a function's type and don't update *ALL* of the files that have calls to that function, you may never here the compiler complaining that you are sending in the wrong type, since those modules won't be recompiled. For example, if you have function foo that calls function bar, and change bar's type from float to double, you won't hear about the fact that you forgot to change foo's function call until you have some other reason to recompile foo. -- Jeremy Grodberg Usenet: ...rochester!kodak!grodberg or kodak!grodberg@cs.rochester.edu Arpa: grodberg@kodak or kodak!grodberg@rochester