This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66155] New: Macro not replaced after multi-line string constant
- From: "elias.assmann at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 May 2015 08:54:30 +0000
- Subject: [Bug fortran/66155] New: Macro not replaced after multi-line string constant
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66155
Bug ID: 66155
Summary: Macro not replaced after multi-line string constant
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: elias.assmann at gmail dot com
Target Milestone: ---
The following program
#define foo "x"
program test
implicit none
print*, 'bla&
bla'//foo
end program test
yields the compiler error
$ gfortran try.F90
try.F90:6.16:
bla'//foo
1
Error: Symbol 'foo' at (1) has no IMPLICIT type
So maybe this should be considered a cpp bug instead? I am posting it here
because I do not know cpp too well, and the problem is definitely
Fortran-related. In any case, the preprocessor prints
$ gfortran -E try.F90
# 1 "try.F90"
# 1 "<command-line>"
# 1 "try.F90"
program test
implicit none
print*, 'bla&
bla'//foo
end program test
I find the same result with all of the following versions:
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
gcc version 5.1.0 (GCC)
g