[128] in Athena Bugs

home help back first fref pref prev next nref lref last post

Nested comments.

daemon@ATHENA.MIT.EDU (Bill Sommerfeld)
Mon Apr 4 15:15:47 1988

Date: Mon, 4 Apr 88 14:51:51 EDT
From: Bill Sommerfeld <wesommer@ATHENA.MIT.EDU>
To: Richard Basch <probe@ATHENA.MIT.EDU>
Cc: Ken Raeburn <raeburn@ATHENA.MIT.EDU>,
Richard, you are wedged again.

No C compiler handles nested comments; it is explicitly stated in K&R
(page 179 of the first edition, copyright 1978) that comments do not
nest:

  2.1 Comments
    The characters /* introduce a comment, which terminates which the
  characters */.  Comments do not nest.

Saber-C warns about the existance of nested comments, but this is to
allow you to detect cases where the programmer left out the closing
delimiter of a different comment, NOT to detect cases where a compiler
for a language other than C will be confused.

				- Bill



home help back first fref pref prev next nref lref last post