Re: [PATCH] libcpp: Fix up -fdirectives-only handling of // comments on last line not terminated with newline [PR100646]

2021-05-19 Thread Marek Polacek via Gcc-patches
On Wed, May 19, 2021 at 09:54:07AM +0200, Jakub Jelinek wrote: > Hi! > > As can be seen on the testcases, before the -fdirectives-only preprocessing > rewrite the preprocessor would assume // comments are terminated by the > end of file even when newline wasn't there, but now we error out. > The f

[PATCH] libcpp: Fix up -fdirectives-only handling of // comments on last line not terminated with newline [PR100646]

2021-05-19 Thread Jakub Jelinek via Gcc-patches
Hi! As can be seen on the testcases, before the -fdirectives-only preprocessing rewrite the preprocessor would assume // comments are terminated by the end of file even when newline wasn't there, but now we error out. The following patch restores the previous behavior. Bootstrapped/regtested on x