This one bit me today

Conor P. Cahill cpcahil at virtech.UUCP
Sat Oct 21 09:23:01 AEST 1989


In article <11348 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> C does not now, and never has, permitted nested /*...*/ comments.
> A compiler when it does treat /*...*/ comments as nesting (however
> the compiler is invoked) is not processing the C programming language.
> If it is advertised as a C compiler in that mode, then yes it is broken.

I agree 100% with this, but it sure would be nice to have a 
compile time flag that would turn on warnings about nested/unmatched
comment areas.  This would make it easier to find the old problem
of:

	some c code	/* this is a comment for that code *?
        some code that now won't be executed...
			/* real end of the comment	   */


I am not asking for nested comments, but for a warning if they do
occur (and the appropriate flag has been passed to the compiler).

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.lang.c mailing list