Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: Yet Another Argument for Nested Comments Message-ID: <572@taumet.com> Date: 29 Jan 91 16:20:59 GMT References: <1991Jan28.205309.2836@unislc.uucp> Organization: Taumetric Corporation, San Diego Lines: 23 scl@unislc.uucp (Sean Landis) writes: >I had a header file, hash.h, that looked like: >#ifndef HASH_H >#define HASH_H >... The code ... >#endif /* HASH_H In this example, an ANSI-conforming compiler is obliged to report a comment which is not terminated in the file in which it started. A helpful compiler would indicate the line on which the comment began. This would have shown you the error immediately upon the first compilation. Even though standard C does not have nested comments, a compiler may warn about something that looks like a nested comment. (A compiler may warn about anything at all, so long as it does not reject or misinterpret a legal program.) -- Steve Clamage, TauMetric Corp, steve@taumet.com