This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -traditional comment elimination (yuk...)
Dave Brolley wrote:
> > 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.
>
Strike that: -traditional compilers did not recognize comments. The above
example should produce a comment *only* if it is the result of a macro expansion
and this is because the -traditional *preprocessor* ends up rescanning the text.
#define UGLY //**/* this is a comment */
UGLY
This example should also work
#define UGLIER //**/* Start a comment
UGLIER end a comment */
These are also example where two passes alone will not solve the problem :-(
Dave