This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Antwort: Re: [Fortran, Patch] Fix CPP <include_path> (PR 37821)


Steve Kargl schrieb am 22.10.2008 19:47:13:

> On Tue, Oct 21, 2008 at 06:28:15PM +0200, Tobias Burnus wrote:
> >
> > first I would like to know how gfortran should handle the following:
> >
> > dir1/include_file
> > dir1/source_file1
> > dir2/source_file2
> >
> > $ gfortran dir1/source_file1 dir2/source_file2
> >
> > In "gcc" an
> >     #include "include_file"
> > succeeds for source_file1 but fails for source_file2.
> >
> > In "gfortran" a
> >    INCLUDE  "include_file"
> > will work for both source_file1 as for source_file2
> >
> > The question is what should happen for
> >    #include "include_file"
> > in gfortran?  The same as for C's #include "..." or the same as for
> > gfortran's INCLUDE?
> >
>
> I think having the nonstandard #include match the Fortran INCLUDE
> behavior is desirable.  This then would permit a very simple change
> in the source code to remove a nonstandard feature in favor of an
> standard feature.
>
> I don't know if this would result in a violation of POLA.
>
> --
> Steve
>
How does gfortran know to look in dir1 while compiling in dir2 ?
Shouldn't that happen with include path processing in both cases ?

Does the difference mean that INCLUDE looks on a different include
path than #include ?

If yes, I'd suggest to unify these, which would automatically make
the behaviour of both spellings the same.

      Markus



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]