From: nxk3 AT dante DOT student DOT cwru DOT edu (Natarajan Krishnaswami) Newsgroups: comp.os.msdos.djgpp Subject: C++ comments in C code (was Re: VESA 2.0 and getch() bug?) Date: 25 Mar 1997 14:35:02 GMT Organization: Case Western Reserve University, Cleveland OH (USA) Lines: 33 Message-ID: References: <199703231843 DOT NAA01913 AT delorie DOT com> Reply-To: nxk3 AT dante DOT cwru DOT edu NNTP-Posting-Host: dante.student.cwru.edu Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Sun, 23 Mar 1997 18:43:27 GMT, DJ Delorie wrote: > > > You can use both C style comments (/* */) and C++ style comments (//) > > with DJGPP. > > Not true. > > You can use both styles of comments in any C++ source, regardless of > compiler, but "//" comments may not be used in C source. Really? This would make djgpp incompatible with much GNU C source. Perhaps you mean to say "//" comments may not be used in ANSI C source. File: gcc.info, Node: C++ Comments, Next: Dollar Signs, Prev: \ Function Prototypes, Up: C Extensions C++ Style Comments ================== In GNU C, you may use C++ style comments, which start with `//' and continue until the end of the line. Many other C implementations allow such comments, and they are likely to be in a future C standard. However, C++ style comments are not recognized if you specify `-ansi' or `-traditional', since they are incompatible with traditional constructs like `dividend//*comment*/divisor'. N. -==(UDIC)==- "Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte, fand er sich in seinem Bett zu einem ungeheueren Ungeziefer verwandelt." -Franz Kafka, "Die Verwandlung"