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

--- Comment #6 from Mark Paris <markwayne1969 at gmail dot com> ---
(In reply to Steve Kargl from comment #5)
> On Thu, Mar 19, 2020 at 10:24:10PM +0000, markwayne1969 at gmail dot com
> wrote:
> > 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?
> 
> Sure.  Anything is possible if someone puts in the time to
> write a Fortran specific preprocessor.  AFAIK, none of the
> current diminishing number of gfortran contributors is 
> working a new preprocessor.  
> 
> > Links to information about gcc development for this specific
> > possible feature would be appreciated.
> 
> I don't know of any gfortran preprocessor projects.  You are 
> more then welcomed to clone the git repository and start
> such a project.  Having new gfortran contributors would be
> healthy for gfortran's future.

Thank you, again for your reply. It's not exactly the information I was looking
for -- perhaps you're not the right person to ask. If not, you might be able to
point me to the correct group.

I was asking whether you knew of any reason that the existing cpp couldn't be
adjusted to handle the '//' disparity with a filename extension dependency.

If this is possible, then it seems like a minor revision, as opposed to what
you appear to have in mind of writing "a Fortran specific preprocessor," which
sounds like a prohibitive undertaking.

Thanks again.

Reply via email to