Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!uwm.edu!uwvax!heurikon!ex.heurikon.com!daves From: daves@ex.heurikon.com (Dave Scidmore) Newsgroups: comp.std.c++ Subject: Re: backslash-newline inside C++ comments? Message-ID: <1011@heurikon.heurikon.com> Date: 30 Oct 90 00:06:42 GMT References: <1990Oct18.230000.14131@twinsun.com> <484@taumet.com> Sender: news@heurikon.heurikon.com Reply-To: daves@ex.heurikon.com (Dave Scidmore) Organization: Heurikon Corporation, Madison, WI Lines: 29 In article <484@taumet.com> steve@taumet.com (Stephen Clamage) writes: >eggert@ata.twinsun.com (Paul Eggert) writes: > >>Is the sequence >> // a co\ >> mment >>a legal comment in ANSI C++? ANSI C's translation phases are as follows: > >There is no such thing as ANSI C++ yet, and indeed this is one of the >issues which must be resolved by the ANSI C++ (X3J16) committee. There >was a heated debate on this very point in comp.lang.c++ (I think) some >months ago. Different C++ compilers currently treat this differently. >To be safe, do not use //-style comments with continued lines. Use /* */ >comments instead. While there may be no ANSI C++ standard, the Anotated C++ Reference manual clearly states the phases of translation, thus resolving this question (they are the same as ANSI C). Since ARM was written as the base document for the ANSI committie you could in an abstract sense consider it the ANSI standard. The need for a standard, in my opinion, stems not so much from ambiguities in ARM (which are very hard to find), but from the fact that compiler writers treat an ANSI standard with much more respect than they do the language authors specification. This leads to different compilers not treating issues like line splicing correctly. -- Dave Scidmore, Heurikon Corp. dave.scidmore@heurikon.com