public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100646] New: gcc -E -fdirectives-only causes "error: unterminated comment" when no new line at the end of file
@ 2021-05-18  6:50 mtekieli+gcc at gmail dot com
  2021-05-18  7:12 ` [Bug c++/100646] [11/12 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mtekieli+gcc at gmail dot com @ 2021-05-18  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100646
           Summary: gcc -E -fdirectives-only causes "error: unterminated
                    comment" when no new line at the end of file
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mtekieli+gcc at gmail dot com
  Target Milestone: ---

$ cat test_gcc11.cpp 
int main()
{
}
// namespace

$ g++ -E -fdirectives-only test_gcc11.cpp -o test_gcc11.o
test_gcc11.cpp:4:1: error: unterminated comment
    4 | // namespace
      | ^

Above error occurs when test_gcc11.cpp or anything included in test_gcc11.cpp
has a comment with no new line at the end of file.

It looks like this patch does not help:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=b6ecd493886891f8150905a2fd3b7d54e88fc7be

It worked fine with gcc 10.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-19 17:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  6:50 [Bug c++/100646] New: gcc -E -fdirectives-only causes "error: unterminated comment" when no new line at the end of file 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
2021-05-31 14:58 ` jakub at gcc dot gnu.org
2021-07-19 17:10 ` jakub at gcc dot gnu.org

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).