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]

Re: [PATCH] Fix debug info when compiling preprocessed fortran sources (.F, .F90, .F95)


On Sat, Dec 31, 2005 at 02:05:39PM +0100, Tobias Schl?ter wrote:
> Wouldn't it be more robust (and possibly simpler) to use libcpp inside the
> Fortran frontend, and to thus do away completely with the need for a temporary
> file?  I think this would be a preferable solution, but I'm sure you had
> reasons to do it this way.

When using libcpp, it already tokenizes the input.  But C/C++ tokens are
very different from Fortran tokens, so you'd basically have to get tokens
from libcpp, decompose them back to the original form and parse that way.

So I don't think it is desirable to do the initial # line handling via
libcpp.

What perhaps could work is use libcpp consumer similar to the one
used for cc1 -E but instead of printing it into the output stream,
print it into buffers and handle load_file that way.  But I don't think
it is worth the trouble, at least for the time being.

	Jakub


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