Article View: comp.std.c
Article #1993Re: Comment Syntax
From: Walter Bright
Date: Thu, 15 Nov 1990 20:23
Date: Thu, 15 Nov 1990 20:23
19 lines
1426 bytes
1426 bytes
In article <48.UUL1.3#5077@aussie.COM> rex@aussie.COM (Rex Jaeschke) writes: /int i; // this comment ends in a backslash \ /int j; /ANSI's phases of translation require that backslash/new-lines be /processed BEFORE comments. In this case the 2 declaration lines would /become: /int i; // this comment ends in a backslash int j; /So, for a future version of ANSI C to adopt //, they would have to /either rearrange the phases of translation (unlikely since that would /no longer be backwards compatible) or to treat // and /**/ comments /differently and add a new phase for //. There was some debate about this on BIX a while back. The consensus seemed to be that the phases of translation were not modified to support // comments. If you had a // comment that ended in a \, then the line got spliced and the next line became part of the comment. This is not a very onerous burden, if it really bugs someone they could always use /* */ comments (in macros is where this problem crops up).
Technical Details
Message-ID:
<162@nazgul.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pilchuck!dataio!fnx!nazgul!brightReferences:
<14390@smoke.brl.mil> <48.UUL1.3#5077@aussie.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.std.c Subject: Re: Comment Syntax Message-ID: <162@nazgul.UUCP> Date: 15 Nov 90 20:23:32 GMT References: <14390@smoke.brl.mil> <48.UUL1.3#5077@aussie.COM> Reply-To: bright@nazgul.UUCP (Walter Bright) Organization: Zortech, Seattle Lines: 19