[Bug fortran/94228] Preprocessor inconsistency for macros when invoked from gfortran
markwayne1969 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 19 22:24:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94228
--- Comment #4 from Mark Paris <markwayne1969 at gmail dot com> ---
(In reply to kargl from comment #3)
> No. Newer C, as opposed to older C, uses // for a comment.
> Fortran uses // as the concatenation operator. Run this
> through a cpp pre-processor.
>
> character(len=80) :: name = 'john ' // 'Doe'
> print *, name
> end
>
> ~/work/bin/cpp a.F
> # 1 "a.F"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "a.F"
> character(len=80) :: name = 'john '
> print *, name
> end
Thank you for your kind reply. I understand that this is an issue of disparate
use of the same operator, '//' in C and Fortran.
Is it possible to have cpp recognize the different uses of // by, say, the file
name extension of the source being processed?
Links to information about gcc development for this specific possible feature
would be appreciated.
More information about the Gcc-bugs
mailing list