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

Daniel Franke franke.daniel@gmail.com
Tue Oct 14 22:55:00 GMT 2008


On Wednesday 15 October 2008 00:24:51 Tobias Burnus wrote:
> using -I dir  was not adding the directory to the #include <...>  search
> path but only to the  #include "..."  search path, which is a regression.
>
> The patch fixes this by adding the path to the chain BRACKET instead of
> to QUOTE. Additionally, I removed the adding of "." which is automatically
> searched for  #include "..."  and thus does not need to be added.

Looks good to me :)
Thanks for looking into it so quickly!


> There is one harmless problem left: gfortran -I dir  passes the -I twice
> to f951 for -cpp (but only once for -nocpp). I think it is due to:
>
> #define F951_OPTIONS     "%(cc1_options) %{J*} %{I*}\

Seems, the first I* is pulled in via gcc/gcc.c (cpp_options) as used by 
F951_CPP_OPTIONS, the second is stated explictly where quoted here.

How about:
#define F951_OPTIONS     "%(cc1_options) %{J*} %{!cpp: %{I*}}\

If there is -nocpp, this explicit I* shall be used, otherwise not?
(This is untested, just off the top of my head).

Regards

	Daniel



More information about the Fortran mailing list