public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100646] [11 Regression] gcc -E -fdirectives-only causes "error: unterminated comment" when no new line at the end of file Date: Mon, 31 May 2021 14:08:45 +0000 [thread overview] Message-ID: <bug-100646-4-vmDc5PU5IG@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100646-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100646 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:3a2fa2e819d4714cecf5048eda2b7e52ba9e3cdd commit r11-8490-g3a2fa2e819d4714cecf5048eda2b7e52ba9e3cdd Author: Jakub Jelinek <jakub@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 <jakub@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. (cherry picked from commit d15a2d261b24adcbfe5e663b15dde3df5d2b3486)
next prev parent reply other threads:[~2021-05-31 14:08 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-18 6:50 [Bug c++/100646] New: " mtekieli+gcc at gmail dot com 2021-05-18 7:12 ` [Bug c++/100646] [11/12 Regression] " rguenth at gcc dot gnu.org 2021-05-18 7:24 ` egallager at gcc dot gnu.org 2021-05-18 7:25 ` egallager at gcc dot gnu.org 2021-05-20 7:09 ` cvs-commit at gcc dot gnu.org 2021-05-20 15:47 ` [Bug c++/100646] [11 " jakub at gcc dot gnu.org 2021-05-31 14:08 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-31 14:58 ` jakub at gcc dot gnu.org 2021-07-19 17:10 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100646-4-vmDc5PU5IG@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).