Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Nested Comments in C -- A recent experience Message-ID: <1990Mar11.222704.16655@utzoo.uucp> Organization: U of Toronto Zoology References: <236100027@prism> <1414@amethyst.math.arizona.edu> <1523@wacsvax.OZ> <4320@daffy.cs.wisc.edu> <1990Mar11.065712.9798@usenet.ins.cwru.edu> Date: Sun, 11 Mar 90 22:27:04 GMT In article <1990Mar11.065712.9798@usenet.ins.cwru.edu> crds@pyrite.som.cwru.edu (Glenn A. Emelko) writes: >... 3 hours looking for a "bug" which turned out not to be a "bug" at all; >rather it went undetected as a programming error BECAUSE our C compiler doesn't >handle nested comments (like most C compilers don't)... You mean "because our C compiler doesn't issue a warning when it sees /* inside a comment". C COMMENTS DO NOT NEST. THEY NEVER HAVE. ANY COMPILER WHICH "HANDLES" NESTED COMMENTS IS NOT A C COMPILER. It is legitimate to complain about a compiler which doesn't flag /* in a comment as a possible error, but claiming that a C compiler should "handle nested comments" is just silly; no C compiler can do that. -- MSDOS, abbrev: Maybe SomeDay | Henry Spencer at U of Toronto Zoology an Operating System. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu