[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 15 08:56:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is actually not much related to the -fpre-include stuff, but is a general
bug in the continuation handling.
If I do:
!
!
!
include 'continuation_9.f90'
then it will show:
f951: Warning: ‘&’ not allowed by itself in line 6
f951: Warning: ‘&’ not allowed by itself in line 7
f951: Warning: ‘&’ not allowed by itself in line 8
rather than:
f951: Warning: ‘&’ not allowed by itself in line 3
f951: Warning: ‘&’ not allowed by itself in line 4
f951: Warning: ‘&’ not allowed by itself in line 5
when I compile continuation_9.f90 directly.
load_line has linenum and current_line static int vars that are simply
incremented across all files sourced in rather than being reset when we call
another load_file, or updated e.g. from preprocessor comments.
More information about the Gcc-bugs
mailing list