https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100646

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:d15a2d261b24adcbfe5e663b15dde3df5d2b3486

commit r12-934-gd15a2d261b24adcbfe5e663b15dde3df5d2b3486
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu May 20 09:09:07 2021 +0200

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

    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.

    2021-05-20  Jakub Jelinek  <ja...@redhat.com>

            PR preprocessor/100646
            * lex.c (cpp_directive_only_process): Treat end of file as
termination
            for !is_block comments.

            * gcc.dg/cpp/pr100646-1.c: New test.
            * gcc.dg/cpp/pr100646-2.c: New test.

Reply via email to