Xref: utzoo comp.lang.c:33463 alt.religion.computers:2002 Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aipna!rjc From: rjc@uk.ac.ed.cstr (Richard Caley) Newsgroups: comp.lang.c,alt.religion.computers Subject: Re: ANSI C prototypes Message-ID: Date: 6 Nov 90 01:51:28 GMT References: <1005@christopher-robin.cs.bham.ac.uk> <1906@necisa.ho.necisa.oz> <1990Nov2.030556.27759@ccu.umanitoba.ca> <3933.27353319@cc.helsinki.fi> Sender: news@aipna.ed.ac.uk Organization: Center for Speech Technology Research Lines: 48 In-reply-to: jaakola@cc.helsinki.fi's message of 5 Nov 90 09:38:33 GMT In article <3933.27353319@cc.helsinki.fi> jaakola@cc.helsinki.fi writes: It's okay for me to make an include file, where I declare functions that are visible to other modules. But consider the following example: static void auxiliary_func(a) /* private helper-function */ int a; { ... } void visible_fun(b) int b; { ... auxiliary_func(b+1); /* should be checked */ ... } The point is, why should I have to tell the compiler twice the type of auxiliary_func? You don't. In the above case you havn't even told it once. If you did... static void auxiliary_func(int a) { ... } you wouldn't need to type anything more. Or if you did that would be a massive compiler misfeature. This even saves you a couple of characters :-) Ok, I could turn off such warnings in Microsoft C 5.1, but this turns off some useful checks as a side-effect! Please, Microsoft, make a "prototypes-off" switch into Microsoft C for me! If the compiler really does complain in the case where you give the full type in the function definition then I agree that the writers had better start watching out for mobs of irate users coming after them with pitchforks and flaming torches. Someone must make a working C compiler for your machine... -- rjc@uk.ac.ed.cstr