Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!inmos!conor@lion.inmos.co.uk From: conor@lion.inmos.co.uk (Conor O'Neill) Newsgroups: comp.lang.c Subject: Re: lint (was: Funny mistake) Message-ID: <15168@ganymede.inmos.co.uk> Date: 2 Apr 91 12:17:20 GMT References: <1991Mar22.055335.23091@athena.mit.edu> <13619@helios.TAMU.EDU> <13627@helios.TAMU.EDU> <5043@goanna.cs.rmit.oz.au> Sender: news@inmos.co.uk Reply-To: conor@inmos.co.uk (Conor O'Neill) Organization: INMOS Limited, Bristol, UK. Lines: 17 In article <5043@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: >But how do you check that the prototypes used in file FOO.C agree with >the function definitions in file BAZ.C? If the programmer makes a habit >of #including the header files with the prototypes _both_ in the files >that use things _and_ in the files that provide them, all is well. If >not, and there is nothing in ANSI C to require it, we're back in the >realm of Pascal, i.e. up the well known creek without a paddle. The INMOS ANSI C compiler has a command line switch ("software quality policing") which will warn if an externally visible function is detected which was not preceded by a prototype. If prototypes are only ever written in header files, this provides the required security. --- Conor O'Neill, Software Group, INMOS Ltd., UK. UK: conor@inmos.co.uk US: conor@inmos.com "It's state-of-the-art" "But it doesn't work!" "That is the state-of-the-art".