This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -traditional comment elimination (yuk...)


Zack Weinberg wrote:

> To get the variant effect of comments on directive lines (other than
> #define), we could cause comments to be equivalent to whitespace in
> directives, even when -traditional (which is what a K+R preprocessor
> did).

Not quite. Comments were separators on a directive for a K&R preprocessor,
but they were still removed. See the 'cat' macro example in my previous note.

> I wouldn't worry about
>
> //**/* this is a comment */
>
> unless and until someone reports that this breaks real code.

This and most other comment-creation effects will be handled by default with
two passes. This is because in a K&R preprocessor/compiler system, the
compiler still recognized comments.

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]