comment style

Norman Diamond diamond at jit345.swstokyo.dec.com
Mon Jan 7 13:30:42 AEST 1991


In article <1990Dec29.040256.21708 at clear.com> rmartin at clear.com (Bob Martin) writes:

>Does anybody know what the standard says about nested comments?
>i.e.  	/*
>		/* is this valid
>		/* or will it generate errors 
>		/**/
>The sun C++ compiler chokes on comments like this, as do a few other C
>compilers around.  What is the official stance.

So the sun C++ compiler is does not conform to the ANSI C standard.
No C++ compiler can, though not for this reason.

The other compilers mentioned are not ANSI C compilers, though they seem
to be asserted as compilers for other dialects of C.  Extraneous warnings
are allowed (and are obviously desirable in this case, though should be
optionable), but choking is not allowed.
--
--
Norman Diamond       diamond at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.



More information about the Comp.std.c mailing list