public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/100904] New: [9/10/11 Regression] Wrong line location #include error "No such file or directory" – line + 1 [traditional mode as used by gfortran]
@ 2021-06-04 16:22 burnus at gcc dot gnu.org
  2021-06-07  9:09 ` [Bug preprocessor/100904] [9/10/11/12 " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-06-04 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100904
           Summary: [9/10/11 Regression] Wrong line location #include
                    error "No such file or directory" – line + 1
                    [traditional mode as used by gfortran]
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Working: GCC 6
Failing since: GCC 7

 * * *

echo '#include "nonExisting.h"' > file.c
echo '#include "nonExisting.h"' > file.F90

will give the wrong error location with:

  gfortran file.F90
or
  gcc -traditional-cpp file.c

Namely:
  file.c:2:2: fatal error: nonExisting.h: No such file or directory

Expected:
  Some line location in line 1.

  For instance, GCC 6 shows:

file.c:1:0: fatal error: nonExisting.h: No such file or directory
 #include "nonexisting.h"

 * * *

NOTE: gfortran only supports the traditional mode (as Fortran syntax and C
syntax does not mix well without additional cpp tweaking).

In C/C++, it works in non-traditional mode.

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

end of thread, other threads:[~2023-07-07 10:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 16:22 [Bug libgcc/100904] New: [9/10/11 Regression] Wrong line location #include error "No such file or directory" – line + 1 [traditional mode as used by gfortran] burnus at gcc dot gnu.org
2021-06-07  9:09 ` [Bug preprocessor/100904] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-06-08 17:21 ` jakub at gcc dot gnu.org
2021-06-08 18:28 ` jakub at gcc dot gnu.org
2021-06-10  0:25 ` dmalcolm at gcc dot gnu.org
2022-01-20 12:58 ` rguenth at gcc dot gnu.org
2022-05-27  9:45 ` [Bug preprocessor/100904] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 10:40 ` [Bug preprocessor/100904] [11/12/13/14 " rguenth 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).