This is the mail archive of the gcc@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]

Re: [REQUEST] g77 & fortran dependencies


On Fri, Jan 05, 2001 at 10:26:07PM +0100, Toon Moene wrote:
> Art Haas wrote:
> 
> > Over on the gcc-patches mailing list there have been a number of recent
> > patches dealing with the preprocessor and C/C++ dependencies. I'd like to
> > suggest that, if possible, a change be made to handle `INCLUDE' statements
> > in fortran code so that g77 could provide similiar dependency information.
> > At present, this sort of dependency info can only be obtained if the
> > C-like `#include' statements.
> 
> Note that currently, the preprocessor for C/C++ is *integrated* with the
> frontend - it isn't a separate program anymore.  Hence, its features
> *cannot* be transported to the preprocessing of Fortran source, because
> g77 uses "tradcpp", which is a very old version of the original GNU C
> preprocessor.
> 
> The reason for this difference is that the implementors of the
> integrated C/C++ preprocessor weren't able to write one that correctly
> preserved Fortran syntax while preprocessing.

All that you say is true, but I'd like to point out that the
dependency generator is independent of the rest of the C preprocessor.
Java, for example, uses it directly.  It shouldn't be too hard to hook
it into Fortran as well.

I don't remember if tradcpp knows about -M, but if it does, you'd need
to be careful that it and g77 didn't trip over each other.

zw


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