Comment Syntax

Stephen Clamage steve at taumet.com
Sun Nov 18 12:01:36 AEST 1990


wald at theory.lcs.mit.edu (David Wald) writes:

>How much of a problem would this be?  It would mean that \\\n behaves
>the same in comments as outside them, but that is already the case.
>What do BCPL or C++ do with a comment like this?

We don't have an actual standard for C++ yet, but E&S specifies (16.1)
that trigraphs and escaped newlines are processed before comments.
This is the same as in ANSI C, except that C++ also has the //-style
comment.  If ANSI C were to adopt //-style comments, I assume it
would use the same rule, since anything else would violate the
existing phases of translation.  The idea is to allow machine-generated
code to fold at any convenient point on systems with line-length
limitations, and not have to parse the code to figure out where was
a safe place.
-- 

Steve Clamage, TauMetric Corp, steve at taumet.com



More information about the Comp.std.c mailing list