Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site utah-gr.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!utah-cs!utah-gr!thomas
From: thomas@utah-gr.UUCP (Spencer W. Thomas)
Newsgroups: net.lang.c
Subject: Re: Standardization questions (cpp mostly)
Message-ID: <1200@utah-gr.UUCP>
Date: Tue, 9-Oct-84 22:58:17 EDT
Article-I.D.: utah-gr.1200
Posted: Tue Oct  9 22:58:17 1984
Date-Received: Fri, 12-Oct-84 04:47:05 EDT
References: <83@decvax.UUCP> <143@desint.UUCP>
Reply-To: thomas@utah-gr.UUCP (Spencer W. Thomas)
Organization: Univ of Utah CS Dept
Lines: 28

In article <143@desint.UUCP> geoff@desint.UUCP (Geoff Kuenning) writes:
>YAY, YAY, YAY, YAY!  I have probably lost a full eight hours in the last year
>due to my habit of typing /* ... *? ... /* ... */ (I'm a bit slow on the
>shift key at times) and then having to spot it by eye or even with a debugger.
>This is SO easy to detect, and it is far more often a true error than not.
>(Although people who comment out commented code by putting /* at the front of
>the line will get lots of warnings...but they were playing with fire in the
>first place).

I have been using a program called cchk, which was posted to the net a
couple of years ago.  It detects nested comments, indentation "errors",
if ( a = b ), and so on.  I find it very useful for checking for
possible typing errors.  It even produces a message for
	if ( a )
		if ( b )
			something;
	else
		something_else;

("else matched to wrong if").

I could post it to the net again, I guess, if there's interest (I've
made some local changes dealing mostly with making it work better with
make, and changed the error message format to make Gosling's emacs
happy).

=Spencer