public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/101298] New: Inclusion of a file without trailing newline breaks -fdirectives-only
@ 2021-07-02 13:12 boris at kolpackov dot net
  2021-07-05  6:13 ` [Bug preprocessor/101298] [11/12 Regression] " rguenth at gcc dot gnu.org
  2021-07-19 17:10 ` [Bug c++/101298] " jakub at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: boris at kolpackov dot net @ 2021-07-02 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101298
           Summary: Inclusion of a file without trailing newline breaks
                    -fdirectives-only
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

cat <<EOF >test.cxx
#include "test.hxx"
#include <iostream>
int main () {}
EOF

echo -n "// no newline" >test.hxx

g++ -E -fdirectives-only -o test.ii test.cxx
In file included from test.cxx:1:
test.hxx:1:1: error: unterminated comment

echo -n "void f () {}" >test.hxx

g++ -E -fdirectives-only -o test.ii test.cxx

grep "void f () {}" test.ii
void f () {}# 2 "test.cxx" 2

g++ -c -fdirectives-only test.ii
In file included from test.cxx:1:
test.hxx:1:13: error: stray ‘#’ in program

This used to work fine prior to GCC 11. I believe this issue is similar but not
the same as bug #100646.

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

* [Bug preprocessor/101298] [11/12 Regression] Inclusion of a file without trailing newline breaks -fdirectives-only
  2021-07-02 13:12 [Bug preprocessor/101298] New: Inclusion of a file without trailing newline breaks -fdirectives-only boris at kolpackov dot net
@ 2021-07-05  6:13 ` rguenth at gcc dot gnu.org
  2021-07-19 17:10 ` [Bug c++/101298] " jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-05  6:13 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.2
            Summary|Inclusion of a file without |[11/12 Regression]
                   |trailing newline breaks     |Inclusion of a file without
                   |-fdirectives-only           |trailing newline breaks
                   |                            |-fdirectives-only

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

* [Bug c++/101298] [11/12 Regression] Inclusion of a file without trailing newline breaks -fdirectives-only
  2021-07-02 13:12 [Bug preprocessor/101298] New: Inclusion of a file without trailing newline breaks -fdirectives-only boris at kolpackov dot net
  2021-07-05  6:13 ` [Bug preprocessor/101298] [11/12 Regression] " rguenth at gcc dot gnu.org
@ 2021-07-19 17:10 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-07-19 17:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I certainly can't reproduce on the trunk with
r12-934-gd15a2d261b24adcbfe5e663b15dde3df5d2b3486 or later or on the 11 branch
since
r11-8490-g3a2fa2e819d4714cecf5048eda2b7e52ba9e3cdd
so it seems to be exact dup.

*** This bug has been marked as a duplicate of bug 100646 ***

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 13:12 [Bug preprocessor/101298] New: Inclusion of a file without trailing newline breaks -fdirectives-only boris at kolpackov dot net
2021-07-05  6:13 ` [Bug preprocessor/101298] [11/12 Regression] " rguenth at gcc dot gnu.org
2021-07-19 17:10 ` [Bug c++/101298] " 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).