Xref: utzoo comp.lang.c:11539 comp.sys.ibm.pc:17523 Path: utzoo!attcan!uunet!mcvax!eurtrx!euraiv1!evas From: evas@euraiv1.UUCP (Eelco van Asperen) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Automatic Function Prototype Generation Message-ID: <764@euraiv1.UUCP> Date: 27 Jul 88 13:40:18 GMT References: <306@optilink.UUCP> Organization: Erasmus University EF/AIV,Rotterdam,Netherlands Lines: 24 in article <306@optilink.UUCP>, cramer@optilink.UUCP (Clayton Cramer) says: > Microsoft C has an option /Zg for automatic generation of function > prototypes. The theory is that you do something like: > > cl /Zg foo.c >foo.e > > to generate a foo.e file to include in other modules that reference > functions contained in foo.c. This works. The problem is make files. I use the /Zg option only to convert existing programs; for each file that exports functions, I create a header-file that contains relevant declarations and the prototypes. This file is included in the file itself to let the compiler check that the prototypes still match the current declarations and in the files that use the functions. Now, if you change a function declaration and forget to update the header-file, the compiler will complain that the prototype does not match the actual declaration. -- Eelco van Asperen. uucp: evas@eurtrx / mcvax!eurtrx!evas #include earn/bitnet: asperen@hroeur5 #include "We'ld like to know a little bit about you for our files" - Mrs.Robinson, Simon & Garfunkel