Fixes to make 20000508 cpplib's -C a little more useful
Jason R Thorpe
thorpej@zembu.com
Tue May 9 09:23:00 GMT 2000
On Tue, May 09, 2000 at 01:56:41AM -0700, Zack Weinberg wrote:
> Your patch doesn't handle the case of
>
> #undef foo /* blah */ bar
>
> which still needs to get the junk-on-line complaint. The proper way
> to handle that, I believe, would be to write
>
> while ((token = _cpp_get_directive_token (pfile)) == CPP_COMMENT);
> if (token != CPP_VSPACE)
> issue error;
Okay, I have changed the code to do this, and have also changed lex().
However, I just noticed something that I didn't notice before -- while
the comment in the dummy header is copied, the comments after the directives
are not ... they are getting placed into the output buffer, but it looks
like the CPP_SET_WRITTEN() call after the directive is completed clobbers
the comment that is placed there. I'm going to spend some more time trying
to figure out what to do about that... if you have any suggestions, I'd love
to hear them.
> Do you have a copyright assignment on file with FSF? We need that
> before we can accept any patches from you.
I mailed an assign.future and disclaim.future to the FSF early last week.
They have not yet been ACK'd.
--
-- Jason R. Thorpe <thorpej@zembu.com>
More information about the Gcc-patches
mailing list