https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117840
Bug ID: 117840
Summary: backslash at the end of a commented line, in files
that need to be preprocessed
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Only for files which have the .F90 extension (that is, a file that needs to be
preprocessed), the "bang" character doesn't seem to protect to the
interpretation of the comment.
To give two examples:
1) a backslash at the end of a commented line suppresses the next line, which
can lead to a compile error if the removed line is a valid Fortran statement.
program first
! this is a commented line, which have a backslash at its end \
integer, parameter :: n = 2
integer :: array(n)
end program
2) an opening C-comment ("/*") inside everywhere is a commented line leads to a
compile error, if it is not closed in the same line.
program essai
! from ... /* beginning of a C-comment
end program
-------
Both bugs arise in versions 10.5 to 14.2 (at least)