[gnu.gcc] GNU lint

geoff@warwick.UUCP (Geoff Rimmer) (01/13/89)

Does anyone know of a lint that will accept C function prototypes?  The
standard lint gives horrible errors whenever it encounters them, and so I am
having to use the following: 

I define PROTO only when gcc is being used - when I am lint'ing it, PROTO
is not defined.

	#ifdef PROTO
	#define P(x) x
	#else
	#define P(x) ()
	#endif

and then

	extern char *function P((int a, char *b, float c));

This is annoying, but just about bareable.  However, I like to define
functions in the same way as prototypes:

	extern char *function(int a, char *b, float c)
	{
	...
	}

rather than

	extern char *function(a,b,c)
		int a;
		char *b;
		float c;
	{
	...
	}

Is there already, or is someone working on, a GNU lint that will complement
gcc with features of the regular lint, in addition to accepting the ANSI
prototypes and function definitions?

Geoff

	-----------------------------------------------------------------
	Geoff Rimmer, Computer Science, University of Warwick, England

		geoff@uk.ac.warwick.emerald

	"When I eat, I like to dice with a heart attack.  Let's have a
	 good old-fashioned English roast, with a coronary phrombosis
	 to follow."
	"OK, I'll make a shopping list ... 400lbs of oven chips ......
	 Well that seems simple enough."

		- Filthy Rich and Catflap, 1986
	-----------------------------------------------------------------