This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: -cpp and 'include'


On Monday 18 May 2009 22:50:03 Tom Browder wrote:
> cpp with C or C++ doesn't have to consider this problem because the
> '#include' statement is the only way a file can be included inline at
> a desired place in a source file.  Since F95 has the 'include'
> statement, and the intent of the user is to preprocess fortran source,
> then I think a case can be made for doing the fortran include before
> running cpp.

To phrase it differently:

 (a) parse a fortran-file with fortran rules
 (b) middle-process the generated fortran-source by C-preprocessor rules
 (c) parse and process the resulting code by fortran rules again

Yuk.


> Maybe an integrated coco preprocessor is the best solution.  Is that
> planned?

Discussed and regarded as WONTFIX. There's a freely available COCO processor, 
you could use it to preprocess your source before feeding it to the compiler. 

Do you know how COCO is supposed to handle include directives in this case?

Regards

	Daniel


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