This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, Patch] Fix CPP <include_path> (PR 37821)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Oct 2008 10:47:13 -0700
- Subject: Re: [Fortran, Patch] Fix CPP <include_path> (PR 37821)
- References: <20081016185253.GA12858@net-b.de> <48FE031F.4040608@net-b.de>
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