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

Tobias Burnus burnus@net-b.de
Tue Oct 14 22:25:00 GMT 2008


Hi all,

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.

Build on x86-64-linux and regtested.
OK for the trunk?

 * * *

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*}\

The %{I*}  causes the second -I, I don't know where the first -I comes from,
maybe from cc1_options? In any case it only appears for -cpp. The effect is
a warning that the duplicated -I has been removed, which is only shown when
compiled with "-v". I fill a bug for this.

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp.diff
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081014/551e29b9/attachment.bin>


More information about the Fortran mailing list