Standardization questions (cpp mostly)

Spencer W. Thomas thomas at utah-gr.UUCP
Wed Oct 10 12:58:17 AEST 1984


In article <143 at desint.UUCP> geoff at 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



More information about the Comp.lang.c mailing list